Part Number Hot Search : 
10046 M54564 ARX4810 RT8012A DL4446 PNX8526 EL2242J AS1520
Product Description
Full Text Search
 

To Download STPMC1 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  this is information on a product in full production. april 2012 doc id 15728 rev 6 1/77 77 STPMC1 programmable poly-phase energy calculator ic datasheet ? production data features supports 1-, 2- or 3-phase wye and delta services, from 2 to 4 wires computes cumulative active and reactive wide- band and fundamental harmonic energies computes active and reactive energies, rms and momentary voltage and current values for each phase supports rogowski coil, current transformer, shunt or hall current sensors exclusive ripple-free energy calculation algorithm programmable pulsed output stepper motor outputs neutral current, temperature, and magnetic field monitoring otp memory for configuration and calibration spi interface supports iec 62052-11 / 62053-21 / 62053-23 standards less than 0.1 % error over 1:1000 dynamic range applications power metering description the STPMC1 device functions as an energy calculator and is an assp designed for effective energy measurement in power line systems utilizing rogowski, current transformer, shunt or hall current sensors. used in combination with one or more stpmsx ics, it implements all the functions needed in a 1-, 2- or 3-phase energy meter. it can be coupled with a microprocessor for multi-function energy meters, or it can directly drive a stepper motor for a simple active energy meter. the calculator has five input data pins. the first three receive the voltage and current information of the phases. in fact, each data input processes two ? signals, multiplexed in time and generated by the stpmsx device. the fourth input receives multiplexed ? signals also, and can be used to sense the neutral current or another signal - temperature, for example. the fifth input data pin accepts non-multiplexed ? signals and it can be used for sensing the magnetic field information from a hall sensor. four internal hard-wired dsp (digital signal processing) units perform all the computations on the ? streams in real time by means of ? arithmetic blocks. this allows the achievement of very high computation precision with fast and efficient digital architecture. all the data recorded by the STPMC1 are accessible through an spi port, which is also used to configure and calibrate the device. the configuration and calibration data can be saved in a 112-bit otp block, or dynamically set in microprocessor-based meters. tssop20 table 1. device summary order code temperature range package packaging STPMC1btr - 40 to 85 c tssop20 (tape and reel) 2500 parts per reel www.st.com
contents STPMC1 2/77 doc id 15728 rev 6 contents 1 functional block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5 application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7 terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.1 measurement error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.2 conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.3 notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 8 typical performance characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 9 theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 9.1 general operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 9.2 power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 9.3 resetting the STPMC1 (status bit hlt) . . . . . . . . . . . . . . . . . . . . . . . . . . 21 9.4 clock generator (bits mdiv, fr1, hsa) . . . . . . . . . . . . . . . . . . . . . . . . . . 21 9.5 zero crossing detection (signal zcr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 9.6 period and line voltage measurement (status bits: lin, bfr, low, bff) 23 9.7 single wire operation mode: swm (status bits: nah, bfr, configuration bit frs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 9.8 load monitoring (status bit bil, configuration bit ltch) . . . . . . . . . . . . . 26 9.9 error detection (status bits: bcf, pin) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 9.10 tamper detection module (status bits: bcs, bsf, bif, configuration bit enh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 9.10.1 sum of currents is above tamper threshold (status bit bcs) . . . . . . . . . 28 9.10.2 phase sequence is wrong (status bit bsf) . . . . . . . . . . . . . . . . . . . . . . 31 9.10.3 phase active powers do not have the same sign (status bit bif) . . . . . 32
STPMC1 contents doc id 15728 rev 6 3/77 9.10.4 emi is detected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.11 energy to frequency conversion (configuration bits: apl, kmot, lvs, fund) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.12 using STPMC1 in microcontroller based meter - peripheral operating mode (configuration bits: apl, kmot, lvs, fund) . . . . . . . . . 34 9.13 driving a stepper motor - standalone operating mode (configuration bits: apl, lvs, kmot) . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9.14 negative power accumulation (configuration bit abs, status bit sign) . . 37 9.15 phase delay calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 9.16 calibration (configuration bits: pm, tcs, cix, cvx, cca, ccb, cpx) . . 40 9.16.1 voltage and current channels calibration . . . . . . . . . . . . . . . . . . . . . . . . 40 9.16.2 phase compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 9.16.3 mutual current compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9.17 data records map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 9.17.1 group 0 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 9.17.2 group 1 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 9.17.3 group 2 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 9.17.4 group 3 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 9.17.5 group 4 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 9.17.6 group 5 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 9.17.7 group 6 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9.17.8 parity calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9.18 status bits map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 9.19 configuration bits map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 9.20 mode signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 9.21 spi interface (configuration bit sclp) . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 9.21.1 remote reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.21.2 reading data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 9.21.3 writing procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 9.21.4 interfacing the standard 3-wire spi with STPMC1 spi . . . . . . . . . . . . . 65 9.21.5 permanent writing of the cfg bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 10 energy calculation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 10.1 active energy calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 10.2 reactive energy calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 10.3 voltage and current rms values calculation . . . . . . . . . . . . . . . . . . . . . . 71
contents STPMC1 4/77 doc id 15728 rev 6 10.4 energy integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 10.5 fundamental power calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 11 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 12 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
STPMC1 list of tables doc id 15728 rev 6 5/77 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 table 3. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 table 4. thermal data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 table 5. programmable pin functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 table 6. typical external components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 7. electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 8. notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 9. input channels from the stpmsx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9 table 10. frequency settings through mdiv and fr1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 11. clk pin frequency settings through hsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 12. STPMC1 configuration for stpms2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 13. good frequency ranges for different clock source values. . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 14. no-load detection thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 15. tamper conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 16. pin description versus sys configuration (ux and ix represent the voltage and the current signals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 17. energy registers lsb value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 table 18. led pin configuration for apl = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 19. led pin configuration for apl = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 20. configuration of mop and mon driving signals with apl = 1, 2, 3 . . . . . . . . . . . . . . . . . . 36 table 21. led pin configuration for apl = 2, 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 22. accumulation mode for negative power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 23. f phc frequency settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 24. f phc frequency values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 25. f phc frequency settings for pm = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 26. phase compensation for pm = 0, tcs = 0, fline = 50 hz . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 27. phase compensation for pm = 0, tcs = 1, fline = 50 hz . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 28. phase compensation for pm = 1, fline = 50 hz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 29. mutual current compensation matrix for single-phase systems (sys > 3) . . . . . . . . . . . . . 45 table 30. mutual current compensation matrix for three-phase systems (sys < 4) . . . . . . . . . . . . . 45 table 31. 3-phase status bits description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 32. x-phase status bits description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 33. configuration bits map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 34. mode signals description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 35. functional description of commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 table 36. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
list of figures STPMC1 6/77 doc id 15728 rev 6 list of figures figure 1. STPMC1 device block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 figure 2. pin connections (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 figure 3. application schematic in standalone operating mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 4. application schematic using an mcu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 5. supply current vs. supply voltage, t a = 25c (f xtal1 = 4.194 mhz, f xtal1 = 8.192 mhz) . 17 figure 6. digital voltage regulator: line - load regulation. (f xtal1 = 0; 100 nf across v cc and v ss ; 1 f across v dd and v ssa ; t a = 25 c). . . . . . . . . . . . . . . . . . . . . . 17 figure 7. gain response of decimator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 8. connections of oscillator: (a) quartz, (b) external source . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 9. zcr signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 10. lin and bfr behavior when f line > f mclk /2 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 11. currents of the three phase system in example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 12. stepper driving signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 13. phase delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 figure 14. group 0 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 figure 15. group 1 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 figure 16. group 2 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 figure 17. group 3 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 figure 18. group 4 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 19. group 5 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 figure 20. group 6 data records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 21. timing for providing remote reset request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1 figure 22. timing for data records reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 23. data records reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 24. timing for writing configuration and mode bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
STPMC1 functional block diagram doc id 15728 rev 6 7/77 1 functional block diagram note: dax stands for dar, das, dat, and xdsp stands for rdsp, sdsp, tdsp. figure 1. STPMC1 device block diagram linear vregs vdd vcc xtal1 dax clk dax-c dax-v xdsp dan dah dan-c dan-v ndsp enh 1 0 1 0 clock generator por xtal2 band gap vbg bias energy to freq converters led 112 otp configurators votp spi interface scs syn sda scl stepper driver mop mon vss vssa linear vregs vdd vcc xtal1 dax clk dax-c dax-v xdsp dan dah dan-c dan-v ndsp enh 1 0 1 0 clock generator por xtal2 band gap vbg bias energy to freq converters led 112 otp configurators votp spi interface scs syn sda scl stepper driver mop mon vss vssa
pin configuration STPMC1 8/77 doc id 15728 rev 6 2 pin configuration figure 2. pin connections (top view) mop scs v dd v ss v cc led sdatd sclnlc xtal1 xtal2 syn v ssa mon v otp dah dar clk dan dat das STPMC1 mop scs v dd v ss v cc led sdatd sclnlc xtal1 xtal2 syn v ssa mon v otp dah dar clk dan dat das STPMC1 table 2. pin description pin n symbol type (1) name and function 1 mon d / p o programmable output pin, see ta b l e 5 2 mop d / p o programmable output pin, see ta b l e 5 3 scs d i digital input pin, see ta bl e 5 4v dd a o 1.8 v output of internal low drop regulator which supplies the digital core 5v ss a gnd ground level for pad-ring and power supply return 6v cc p i supply voltage 7v otp p i supply voltage for otp cells 8 dah d i input for non-multiplexed ? signals 9 dar d i input for multiplexed ? r-phase signals 10 das d i input for multiplexed ? s-phase signals 11 dat d i input for multiplexed ? t-phase signals 12 dan d i input for multiplexed ? ptat and neutral signal 13 clk d o 2 ma clock output for stpmsx devices 14 v ssa a gnd ground level of core 15 syn d i/o programmable input/output pin, see ta bl e 5 16 xtal2 a crystal oscillator pin 17 xtal1 a crystal oscillator pin 18 sclnlc d i/o programmable input/output pin, see ta bl e 5 19 sdatd d i/o programmable input/output pin, see ta bl e 5 20 led d o programmable output pin, see ta b l e 5 1. a: analog, d: digital, p: power, i: input, o: output, gnd: ground
STPMC1 maximum ratings doc id 15728 rev 6 9/77 3 maximum ratings note: absolute maximum ratings are those values beyond which damage to the device may occur. functional operation under these condition is not implied. table 3. absolute maximum ratings symbol parameter value unit v cc dc input voltage - 0.3 to 6 v i pin current on any pin (sink/source) 150 ma v id input voltage at all pins -0.3 to v cc + 0.3 v v otp input voltage at otp pin - 0.3 to 25 v esd human body model (all pins) 3.5 kv t op operating ambient temperature - 40 to 85 c t j junction temperature - 40 to 150 c t stg storage temperature range - 55 to 150 c table 4. thermal data symbol parameter value unit r thja thermal resistance junction-ambient 114.5 (1) c/w 1. this value refers to single-layer pcb, jedec standard test board.
functions STPMC1 10/77 doc id 15728 rev 6 4 functions table 5. programmable pin functions programmable pin standalone mode (apl = 2 or 3) peripheral mode (apl = 0 or 1) mon output for stepper node (mb) - charge pump watchdog reset mop output for stepper node (ma) - charge pump zcr signal led 3-phase energy pulsed output programmable energy pulsed output sclnlc no load indicator spi interface sdatd tamper indicator syn-np negative power indicator scs spi data transmission enable
STPMC1 application doc id 15728 rev 6 11/77 5 application figure 3. application schematic in standalone operating mode n r s t current sensor current sensor current sensor voltage sensor voltage sensor voltage sensor current sensor stpms1 stpms1 stpms1 stpms1 3 v to 5.5 v STPMC1 dar das dah clk xtal1 xtal2 vss vdd vssa sda-td scl-nc syn-np scs led mop mon votp vcc dan dat negative power no load condition tamper detection stepper counter pulsed output n r s t current sensor current sensor current sensor voltage sensor voltage sensor voltage sensor current sensor stpms1 stpms1 stpms1 stpms1 3 v to 5.5 v STPMC1 dar das dah clk xtal1 xtal2 vss vdd vssa sda-td scl-nc syn-np scs led mop mon votp vcc dan dat negative power no load condition tamper detection stepper counter pulsed output figure 4. application schematic using an mcu n r s t current sensor current sensor current sensor voltage sensor voltage sensor voltage sensor current sensor stpms1 stpms1 stpms1 stpms1 temp sensor to mcu 3 v to 5.5 v pulsed output energy zero crossing dar das dah clk xtal1 xtal2 vss vdd vssa sda-td scl-nc syn-np scs led mop mon votp vcc dan dat watchdog STPMC1 n r s t current sensor current sensor current sensor voltage sensor voltage sensor voltage sensor current sensor stpms1 stpms1 stpms1 stpms1 temp sensor to mcu 3 v to 5.5 v pulsed output energy zero crossing dar das dah clk xtal1 xtal2 vss vdd vssa sda-td scl-nc syn-np scs led mop mon votp vcc dan dat watchdog STPMC1
application STPMC1 12/77 doc id 15728 rev 6 note: the components listed above refer to a typical metering application. in any case, STPMC1 operation is not limited to the choice of these external components. table 6. typical external components function component value tolerance unit reads or writes to a calculator device via spi and performs computation microprocessor --- --- --- measurement reference clock crystal oscillator 4.194 8.192 4.915 9.830 30 ppm mhz interface r-phase voltage, current stpmsx --- --- --- interface s-phase voltage, current stpmsx --- --- --- interface t-phase voltage, current stpmsx --- --- --- interface ptat, neutral current stpmsx --- --- --- interface ptat or hall stpmsx --- --- --- low-end user interface stepper counter
STPMC1 electrical characteristics doc id 15728 rev 6 13/77 6 electrical characteristics (v cc = 5 v, t a = - 40 to + 85 c, 100 nf across v cc and v ss ; 1 f across v dd and v ssa , unless otherwise specified). table 7. electrical characteristics symbol parameter test conditions min. typ. max. unit energy measurement accuracy f bw effective bandwidth limited by digital filtering 5400hz general section v cc operating supply voltage 3.17 5.5 v i cc supply current. configuration registers cleared or device locked f xtal1 =4.194mhz; v cc =3.2v; c l =100nf; no loads 567ma i cc increase of supply current per configuration bit, during programming f xtal1 =4.194mhz; v cc =3.2v 100 a/bit por power on reset on v cc f xtal1 =4.194mhz 2.5 v v dd digital supply voltage 1.70 1.80 1.90 v v otp otp programming voltage 14 20 v i otp otp programming current per bit single bit programming 5 ma t otp otp programming time per bit single bit programming 500 s i latch current injection latch-up immunity 300 ma digital i/o (dah, dar, das, dat, dan, clk, sda, scs, syn, led) v ih input high voltage other pins 0.75v cc v v il input low voltage other pins 0.25v cc v v oh output high voltage i o =-2ma v cc -0.4 v v ol output low voltage i o =+2ma 0.4 v i up pull up current 15 a t tr transition time c load =50pf, v cc =5v 10 ns power i/o (mop, mon) v oh output high voltage i o =-16ma 0.9v cc v v ol output low voltage i o =+16ma 0.1v cc v t tr transition time c load =50pf, v cc =5v 10 ns
electrical characteristics STPMC1 14/77 doc id 15728 rev 6 note: typical value, not production tested. symbol parameter test conditions min. typ. max. unit crystal oscillator v ih input high voltage 1.2 v v il input low voltage 0.6 v i in input current on xtal2 v cc =5.3v -1 +1 a r p external resistor 1 4 m c p external capacitors 22 pf f xtal1 nominal output frequency 4.000 4.194 4.915 mhz 8.000 8.192 9.830 f mclk internal clock frequency see ta bl e 1 0 8.000 8.192 9.830 mhz f clk output clk pin frequency hsa = 0 f xtal1 /4 mhz hsa = 1 f xtal1 /2 spi interface timing f sclkr data read speed t a = 25c 32 mhz f sclkw data write speed t a = 25c 100 khz t ds data setup time 20 ns t dh data hold time 0 ns t on data driver on time 20 ns t off data driver off time 20 ns t syn syn active width 2/f xtal1 s table 7. electrical characteristics (continued)
STPMC1 terminology doc id 15728 rev 6 15/77 7 terminology 7.1 measurement error the error associated with the energy measured by the STPMC1 is defined as: 7.2 conventions the lowest analog and digital power supply voltage is called v ss which represents the system ground (gnd). all voltage specifications for digital input/output pins are referred to gnd. positive currents flow into a pin. ?sinking current? is the current flowing into the pin, and so it is positive. ?sourcing current? is the current flowing out of the pin, and so it is negative. signal timing specifications treated by a digital control part are relative to xtal1. this signal is provided from the crystal oscillator or from an external source as specified in paragraph 9.4 . signal timing specifications of the spi interface are relative to the sclnlc. there is no direct relationship between the clock (sclnlc) of the spi interface and the clock of the dsp block (xtal1). a positive logic convention is used in all equations. energy true energy true ) reading ( 1 spmc error percentage ? =
terminology STPMC1 16/77 doc id 15728 rev 6 7.3 notation table 8. notation label description uvoltage i current u x phase x voltage (x = r, s, t) i x phase x current (x = r, s, t) i n neutral current u x phase x rms voltage (x = r, s, t) i x phase x rms current (x = r, s, t) p active energy full bandwidth f active energy fundamental q reactive energy full bandwidth r reactive energy fundamental x y x energy type per y phase x = p, f, q, r y = r, s, t or for 3-phase pin pin names are uppercase cfg configuration bit names are underlined sig internal signals and status bits are in italics
STPMC1 typical performance characteristics doc id 15728 rev 6 17/77 8 typical performance characteristics figure 5. supply current vs. supply voltage, t a = 25c ( f xtal1 = 4.194 mhz, f xtal1 = 8.192 mhz) 4 4,5 5 5,5 6 6,5 7 7,5 8 3 3,5 4 4,5 5 5,5 6 v cc (v) i cc (ma) i cc 25c i cc -40c i cc 85c 4 4,5 5 5,5 6 6,5 7 7,5 8 3 3,5 4 4,5 5 5,5 6 v cc (v) i cc (ma) i cc 25c i cc -40c i cc 85c figure 6. digital voltage regulator: line - load regulation. ( f xtal1 = 0; 100 nf across v cc and v ss ; 1 f across v dd and v ssa ; t a = 25 c) -0,5 0 0,5 1 1,5 2 2,5 0123456 v cc (v) v dd (v) -0,5 0 0,5 1 1,5 2 2,5 0123456 v cc (v) v dd (v)
typical performance characteristics STPMC1 18/77 doc id 15728 rev 6 figure 7. gain response of decimator flat band (10hz flat band (10hz ? 300hz) 3 db band (4hz 3 db band (4hz ? 700hz) flat band (10hz flat band (10hz ? 300hz) 3 db band (4hz 3 db band (4hz ? 700hz)
STPMC1 theory of operation doc id 15728 rev 6 19/77 9 theory of operation 9.1 general operation the STPMC1 (also called a calculator) is an assp designed for effective measurement in power line systems utilizing the rogowski coil, current transformer, shunt or hall current sensors. this device, used with the stmicroelectronics stpmsx companion chip (an analog front-end device), can be implemented as standalone or as a peripheral in a microprocessor based 1-, 2- or 3-phase energy meter. the calculator consists of three sections: analog, digital and otp (see figure 1 ): the analog section is composed of a band-gap voltage reference and a low-drop voltage regulator. the digital section consists of a system control, clock generator, three pdsp and a ndsp, a spi interface. the 112-bit otp block and the 16 system signals, used for testing, configuration and calibration purposes, are controlled through spi by means of a dedicated command set. the calculator has five input data pins, of which four are fed by signals generated by the stpmsx, see ta b l e 9 . three of them (dar/das/dat) are used to receive multiplexed signals of voltage and current, implementing energy measurement in 1-, 2- and 3-phase (3 and 4 wires) systems. after being de-multiplexed, each phase input is sent to the correspondent dsp unit that processes voltage and current information and performs energy calculation, according to the settings of the configuration bits (see ta b l e 3 3 ). the dan input, which also receives a multiplexed signal output from stpmsx device, is typically used to monitor neutral current for anti tampering functions in 1-, 2- and 3-phase (4 wires) systems. normally the stpmsx monitors current and voltage but in case of neutral monitoring the voltage channel can be connected to a different type of sensor, for example a temperature sensor. the fifth input data pin (dah) accepts non-multiplexed ? signals. it can be used for emi sensing through hall sensors or for temperature sensing. the companion chip (stpmsx) embeds 2 ? adc converters and the necessary logic capable of providing the multiplexed ? streams. see the stpmsx documentation for more details. table 9. input channels from the stpmsx channel name property signal 1 signal 2 dar multiplexed voltage current das multiplexed voltage current dat multiplexed voltage current dan multiplexed temperature current dah not multiplexed emi or temperature
theory of operation STPMC1 20/77 doc id 15728 rev 6 these four multiplexed signals are separated, by a digital de-multiplexer, back into eight ? signals, called streams. the signal coming from the voltage channel of the stpmsx is named with the suffix v, while the stream coming from the current channel is named with the suffix c. for example, the voltage stream of the s-phase is named das-v. then, each pair of phase the voltage and current stream coming from dar, das and dat is connected to a dual-channel rdsp, sdsp, tdsp unit (i.e. dar-v and dar-c are connected to rdsp). each phase voltage input stream is proportional to phase voltage u. each phase current input stream is proportional to derivation of phase current di/dt, when it originates from rogowski coil, or to phase current i, when it originates from shunt or ct or hall sensor. in this case a derivative is inserted into the voltage channel to get a stream proportional to du/dt. the sensors differ from each other for sensitivity, phase error and susceptibility to external em fields. each of these dsp units performs the following: checks the integrity of the streams calibrates streams filters both streams with a dedicated decimation filter computes active and reactive energies, momentary and rms values for voltage and current, period of power line voltage signal. in each dsp there are calibrators capable of adjusting the readings 12.5%. the power computer does the final calculations of the value and direction of the power and checks for no-load condition. another dual dsp unit, called ndsp, processes the streams coming from dan and dah. in fact, using the enh bit (see ta b l e 3 3 ), the user can select either the voltage stream of the dan pin (dan-v) or the dah stream as the input of the ndsp unit, while the current stream dan-c is always processed as neutral current. in its voltage channel, the ndsp unit uses a 2 s time multiplex to process two streams. during the first half of the interval the voltage input stream is processed (which can be dan- v or dah, according to the enh bit), while during the second half a stream constituted by the sum of all four calibrated currents (i.e. dar-c + das-c + dat-c + dan-c). in its current channel the ndsp unit process the current stream of the neutral conductor as follows: checks the integrity of stream calibrates the stream filters the stream with a dedicated decimation filter computes momentary and rms values of the stream if no errors have been detected in the phase timing, computes phase frequency, integrates the phase powers by means of 3-input integrators of energies and generates all pulse output signals. when the dah input stream is selected, it is checked to detect an external magnetic influence (emi) to the meter.
STPMC1 theory of operation doc id 15728 rev 6 21/77 the calculator, thanks to its flexibility, can work in all worldwide distribution network standards. by programming the sys otp bits, it is possible to implement the following systems: 3-phase, 4-wire rstn, 4-system rstn (tamper); 3-phase, 4-wire rstn, 3-system rst; 3-phase, 3-wire rst_, 3-system rst_ (tamper); 3-phase, 3-wire rst_, 2-system r_t_ (aron); 2-phase, 3-wire _stn, 2-system _st_ (america); 1-phase, 2-wire __tn, 2-system _st_ (tamper coil:coil); 1-phase, 2-wire __tn, 2-system _st_ (tamper coil:shunt); 1-phase, 2-wire __tn, 1-system __t_. the results of all dsp units are available as pulse frequency on pin led, mop and mon, which can also drive a stepper counter, and as states on the digital outputs of device or as data bits in data records, which can be read from the device by means of spi interface from pins sda, snc, scl and syn. this system bus interface is also used during temporary or permanent programming otp bits and system signals or to execute a remote reset request. a logic block common to all dsp units performs other operations like: selecting the valid phase period result from which line frequency is computed in ndsp unit checking the equality of phase angles between all three phase voltages preparing current values for compensation of external intermediate phase magnetic influences checking the sum of currents computing intermediate phase voltages combining the 3-phase status bits performing a watchdog user function after the device is fully tested, configured and calibrated, a dedicated bit of the otp block, called tstd, can be written permanently in order to prevent the change of any configuration bit. 9.2 power supply the supply pins for the analog part are v cc and v ss . the v cc is the power input of the 1.8 v low drop regulator, band-gap reference and bias generators. from the v cc pin a linear regulator generates the +1.8 v voltage supply level (v dd ) which is used to power the otp module and digital core. the v ss pin represents the reference point for all the internal signals. 100 nf low esr capacitors should be connected between v cc and v ss , and 1 f between v dd and v ssa . all these capacitors must be placed very close to the device. the STPMC1 contains a power on reset (por) detection circuit. if the v cc supply is less than 2.5 v then the STPMC1 goes into an inactive state, all the functions are blocked asserting a reset condition. this is useful to ensure correct device operation at power-up and during power-down. the power supply monitor has built-in hysteresis and filtering, which gives a high degree of immunity from false triggering due to noisy supplies. a bandgap voltage reference (vbg) of 1.23 v 1% is used as a reference voltage level
theory of operation STPMC1 22/77 doc id 15728 rev 6 source for the linear regulator. also, this module produces several bias currents and voltages for all other analog modules and for the otp module. 9.3 resetting the STPMC1 (status bit hlt ) the STPMC1 has no reset pin. the device is automatically reset by the power-on-reset detection circuit (por) when the v cc crosses the 2.5 v value, but it can be reset also through the spi interface through a dedicated remote reset request (rrr) command (see paragraph 9.21 for rrr details). the reset through spi is used during production testing or in an application with some on- board microprocessors when a malfunction of the device is detected. resetting the STPMC1 causes all the functional modules of STPMC1 to be cleared, including the otp shadow latches (see paragraph 9.19 for an otp shadow latch memory description). in case of reset through spi the mode signals (see paragraph 9.20 for a description of the mode signals) are not cleared. in cases of reset caused by the por circuit all blocks of the digital part, except the spi interface, are held in a reset state for 125 ms after the reset condition. when the reset is performed through spi, no delayed turn-on is generated. during the device reset, the status bit hlt is held high, meaning that data read from the device register are not valid. 9.4 clock generator (bits mdiv , fr1 , hsa ) all the internal timing of the STPMC1 is based on the xtal1 signal. this signal can be generated in two different ways: quartz: the oscillator works with an external crystal. external clock: the clock is provided by an external source connected to xtal1. the suggested circuits are depicted in figure 8 . figure 8. connections of oscillator: (a) quartz, (b) external source
STPMC1 theory of operation doc id 15728 rev 6 23/77 the clock generator is responsible for two tasks. the first is to retard the turn-on of some functional blocks after por in order to help a smooth start of external power supply circuitry by keeping off all major loads. for this reason, all blocks of the digital part, except the spi interface, are held in a reset state for 125 ms after a power on reset (see section 9.3 ). the second task of the clock generator is to provide all necessary clocks for the digital part. in this task, a mdiv and fr1 programming bits are used to inform the device about the nominal frequency value from xtal1 (f xtal1 ). four nominal frequencies are possible through proper setting of the mdiv and fr1 bits (see ta b l e 1 0 ). the internal master clock f mclk is derived from f xtal1 as shown in ta b l e 1 0 . through the hsa bit the frequency of the output pin clk (f clk ), which provides the clock for the stpmsx devices, can be derived as reported in ta b l e 1 1 . to properly work with stpms2, the clock configurations in ta b l e 1 2 must be used. moreover, with stpms2 companion chip the pm bit must always be set. 9.5 zero crossing detection (signal zcr ) the STPMC1 has a zero crossing detection circuit on the voltage channel that can be used to synchronize some utility equipment to zero crossing or max of line voltage events. this circuit produces the internal signal zcr that has a falling edge every zero crossing of one of the line voltages and a rising edge every peak (positive or negative) of one of the line voltages. table 10. frequency settings through mdiv and fr1 (1) 1. 4 mhz and 8 mhz clock are also supported. mdiv and fr1 have to be set as for 4.194 mhz and 8.192 mhz respectively. f xtal1 mdiv (1 bit) fr1 (1 bit) f mclk 4.194 mhz 0 0 8.389 mhz 4.915 mhz 0 1 9.830 mhz 8.192 mhz 1 0 8.192 mhz 9.830 mhz 1 1 9.830 mhz table 11. clk pin frequency settings through hsa hsa (1 bit) f clk STPMC1 0f xtal1 / 4 1f xtal1 / 2 table 12. STPMC1 configuration for stpms2 mdiv (1 bit) hsa (1 bit) f clk 00f xtal1 / 4 10f xtal1 / 4 01f xtal1 / 2
theory of operation STPMC1 24/77 doc id 15728 rev 6 the zcr signal is a 3-phase voltage zero cross signal. it is the result of a xnor of the zcr of each phase. the zcr of each of the three-phases is a 100 hz signal, so a 3-phase zcr is 300 hz signal. the zcr signal is available on the mop pin only when the STPMC1 works as a peripheral with the configuration bit apl =0. 9.6 period and line voltage measurement (status bits: lin , bfr , low , bff ) from voltage channels, a base frequency signal lin is obtained, which is high when the line voltage is rising and it is low when the line voltage is falling, so that, lin signal represents the sign of dv/dt. with further elaboration, the zcr signal is also produced. a period meter, which is counting up pulses of f mclk /8 reference signal, measures the period of voltage channel base frequency and checks if the voltage signal frequency is in the band going from f mclk /(2 18 - 2 3 ) f mclk /2 18 to f mclk /2 16 . this is done, phase by phase, by means of the signal lin , which trailing edge is extracted and it is used to reset the period meter. if the counted number of f mclk /8 pulses between two trailing edges of lin is higher than the 2 18 equivalent pulses or if the counting is never stopped (no more lin trailing edge), the base frequency exceeds the lower limit and an error flag bfr is set. this error flag is part of the 8-bit status byte of each phase (see ta b l e 3 2 ). figure 9. zcr signal table 13. good frequency ranges for different clock source values f xtal f mclk freq. min. = f mclk /2 18 freq. max. = f mclk /2 16 4.194 mhz 8.389 mhz 32.0 hz 128.0 hz 4.915 mhz 9.830 mhz 37.5 hz 150.0 hz 8.192 mhz 8.192 mhz 31.3 hz 125.0 hz 9.830 mhz 9.830 mhz 37.5 hz 150.0 hz
STPMC1 theory of operation doc id 15728 rev 6 25/77 if the counted number of f mclk /8 pulses between two trailing edges of lin is lower than the 2 16 equivalent pulses, the base frequency exceeds the upper limit. in this case, such error must be repeated three times, in order to set the error flag bfr , as shown in figure 10 . the in-band base frequency resets the flag bfr . if bfr is cleared, the measured period value is latched, otherwise a default value of period is used as a stable data to compute frequency needed to adapt the decimation filter and to perform frequency compensation of reactive energy and rms current i x in case of non rogowski current sensor. the bfr flag is also set if the register value of the rms is too low. in this case also the status bit low is set. the condition for setting low and consequently bfr of each phase is u x < u xmax /32 (u xmax = 2 12 ) it means if the u x register drops below 128 low and bfr are cleared when the register value goes above 256 (u x > u xmax /16). bfr , then, gives also information about the presence of the line voltage. when the bfr error is set, the computation of power is zero and the energy registers (active, reactive and fundamental) are blocked, unless single wire mode operation is entered (see section 9.7 ). when the mop, mon and led pins are configured to provide the pulsed energy information they are held low if bfr is set. the 3-ph status bit bff is the or of each phase bit bfr . 9.7 single wire operation mode: swm (status bits: nah , bfr , configuration bit frs ) the STPMC1 supports single wire meter (swm) operation. in this condition, since there is no voltage information, the current rms values, instead of the energies, are accumulated in 20-bit dedicated registers located in acr, acs, act (20-bit accumulator of rms i x per hour [ah]). figure 10. lin and bfr behavior when f line > f mclk /2 16
theory of operation STPMC1 26/77 doc id 15728 rev 6 each acx register contains a 20-bit accumulator of the relative phase current i x [ah] and an 8-bit register carrying the information about phase delay between voltage channels. the swm mode is indicated by status bit nah =0: bit nah =0 (swm on) happens when bfr =1 and rms value of current signal is i x > i xmax /4096 = 16 (i xmax = 2 16 ). in this case frequency is out of limits and rms current i x is big enough, so it is accumulated in the corresponding acx phase register. bit nah =1 (swm off) happens if bfr =1 and rms value of current signal is i x < i xmax /8192 = 8, or bfr =0. in this case either voltage frequency is out of limits but rms current i x is too small to enter swm mode, or voltage frequency is in the correct range. when bit bfr is set, for a certain phase, its energy registers (active, reactive, fundamental) are blocked. then, if rms value of current signal is big enough, bit nah is cleared (0) and a swm operation is entered. in this case the rms value of current signal is accumulated in acx register and the value of voltage rms u x is set to zero. example 1: single wire operation with sys = 0 sys = 0 (3-phase system) is set and in the r-phase the voltage signal is too low (status bits of phase r bfr = 1 and low = 1). because of the too low voltage signal the frequency can't be calculated and energy registers related to the r-phase are blocked. if rms value of current signal is big enough, the device enters swm and clears nah of r phase. the acr register is incremented by adding i r , the rms value of current signal. example 2: single wire operation with sys = 0 and tcs = 1 sys = 0 (3-phase system) and tcs = 1 (ct sensor selection) are set and in all phases (r, s and t) the voltage signal is too low (status bits bfr = 1 and low = 1 for all phases). because of the too low voltage signal the frequency could not be calculated and all energy registers are blocked. since when tcs = 1, a frequency value is needed to calculate the rms value of the current signal, the default value of 50 hz or 60 hz (if bit frs =1) is taken. if the rms value of current signal is big enough, the device enters swm and clears nah of all phases and acr, acs and act registers is fed with the correspondent i x . the accumulators acx can be read by means of spi. to retrieve energy information, rms value of current signal accumulated in registers acx can be multiplied by a constant representing the value of rms voltage. this operation must be executed by a microcontroller. usually the supply voltage for the electronic meter is taken from the line voltage. in swm, since the line voltage is not present anymore, some other power source must be used in order to provide the necessary supply to STPMC1 and the other electronic components of the meter. 9.8 load monitoring (status bit bil , configuration bit ltch ) the STPMC1 includes in each phase a no-load condition detection circuit with adjustable threshold. this circuit monitors the voltage and the current channels and, when the measured voltage is below the set threshold, an internal signal bil becomes high. the
STPMC1 theory of operation doc id 15728 rev 6 27/77 information about this signal is also available in the status bit bil , one per each phase (see ta b l e 3 2 ). the three phase status bit bil is the and of each phase status bit bil . the no-load condition occurs when the product between u x and i x register values is below a given value. this value can be set by the ltch configuration bits. four different no-load threshold values can be chosen according to the two ltch bits as reported in ta b l e 1 4 . when a no-load condition occurs ( bil = 1) the integration of power is suspended. the no- load condition flag bil in standalone mode blocks generation of pulses for stepper and is brought out to the output selector forcing sclnlc pin low. in peripheral mode, the bil signal can be accessed through the spi interface. the minimum output frequency (at no-load threshold) is given as % of the full-scale (fs) output frequency, where fs internal aw frequency is 1370 hz per phase. example 3: no-load condition threshold calculation an energy meter has a power constant of c = 64000 pulses/kwh on led pin. it is valid the following relation: c = 3600000 * f / p where 3600000 is the factor between kwh and ws and f is the output frequency on the led pin if p power is applied to the meter. the minimum output frequency if ltch [0] = ltch [1] = 1 is: f = 0,010 * 1370 hz = 0,137 hz which gives a no-load condition power threshold equal to: p = 3600000 * 0,137 hz / 64000imp/kwh = 7,7 w in this example, the no-load threshold is equivalent to 7,7 w of load or to a start-up current of 32 ma at 240 v. in nlc function is also implemented an hysteresis. when the current is falling the threshold is half lower than that described above. 9.9 error detection (status bits: bcf , pin ) the STPMC1 has two error detection circuits that checks: the ? signals the state of output pins the first error detection circuit checks if any of the ? signals from the analog part is stuck at 1 or 0 within the period of observation (250 s). in case of detected error the corresponding ? signal is replaced with an idle ? signal, which represents a constant value 0. when this table 14. no-load detection thresholds ltch (2 bits) nlc threshold 0 0,00125*fs 1 0,0025*fs 2 0,005*fs 3 0,010*fs
theory of operation STPMC1 28/77 doc id 15728 rev 6 error occurs the correspondent phase bit bcf is set. when the ? signal becomes correct again the bcf flag is cleared immediately. the 3-ph status bit bcf is the or of each phase bit bfc, but it takes into account also the connection of the neutral wire (dan-i stream). the other error condition occurs if the mop, mon and led pin outputs signals are different from the internal signals that drive them. this can occur if some of this pin is forced to gnd or to some other imposed voltage value. in this case the internal status bit pin is immediately activated providing the information that some hardware problem has been detected, for example the stepper motor has been mechanically blocked. these two error condition don't influence energy accumulation. 9.10 tamper detection module (status bits: bcs , bsf , bif , configuration bit enh ) the tamper detection module is used to prevent theft of energy through improper connection of the meter. the tamper indicator is activated when: sum of currents is above tamper threshold (status bit bcs = 1), phase sequence is wrong (status bit bsf = 1), phase active powers don't have the same sign (status bit bif = 1), electromagnetic interference (emi) is detected (only with enh = 1). in standalone application mode (apl [1] = 1) the sdatd pin is used to notify the tamper condition. in 3-phase system (sys = 0, 1, 2) this output is set if at least one of the internal status bits: bcs , bsf , bif has been set or if emi has been detected. in other systems (sys 0, 1, 2) it indicates only bcs or emi. example 4: tamper output on sdatd pin sys = 0, 1 or 2 and apl [1] = 1: bcs = 0, bsf = 0, bif = 0 tamper (sdatd pin) = 0 bcs = 0, bsf = 1, bif = 1 tamper (sdatd pin) = 1 sys = 0, 1 or 2, apl [1] = 1 and enh = 1: bcs = 0, bsf = 0, bif = 0, emi = 0 tamper (sdatd pin) = 0 bcs = 0, bsf = 0, bif = 0, emi = 1 tamper (sdatd pin) = 1 bcs = 1, bsf = 1, bif = 1, emi = 1 tamper (sdatd pin) = 1 in peripheral application mode these information can be read out by spi interface checking the 3-ph status bits, or the status bits corresponding to each phase. 9.10.1 sum of currents is abov e tamper threshold (status bit bcs ) tamper detection through bit bcs is meaningful only for sys = 0, 2, 5, 6 (systems with neutral wire). in other measurement systems it is not useful because there are not enough input current streams. the STPMC1 check tamper detection only if
STPMC1 theory of operation doc id 15728 rev 6 29/77 where: i max = 2 16 i x = i r + i s + i t + i n for sys = 0, 1, 2, 3, 4, 7 i x = i s + i t for sys = 5, 6 bit bcs is set according to ta bl e 1 5 with ( i x ) rms = (i r + i s + i t + i n ) rms example 5: 3-ph system - bcs = 0 let us consider a three-phase, four wires system where the rms values of the current applied are: i r = 5 a i s = 5 a i t = 4.4 a i n = 0 a the sum of all instantaneous currents (i r + i s + i t + i n ) should always be zero, unless there is a tamper condition. the STPMC1 calculates this sum and put its rms value divided by four (called sirms) into register dmn (see paragraph 9.17.2 ). this value should always be zero (or very close). in our case: the currents are shown in figure 11 below. > 256 i i max x table 15. tamper conditions bcs sys = 0, 1, 2, 3, 4, 7 sys = 5, 6 0 or or 1 or () 8 i i x rms x < s t s i 7 9 i i 9 7 < < t s t i 7 9 i i 9 7 < < () 8 i i x rms x > s t s i 7 9 i i 9 7 > > t s t i 7 9 i i 9 7 > > a 149967 . 0 4 i sirms rms x = ? ? ? ? ? ? =
theory of operation STPMC1 30/77 doc id 15728 rev 6 the value i max corresponds to the maximum current value hold by each rms current register (internal value ffff). it is a function of the sensor type, sensitivity and of the current channel gain. let us suppose that i max = 180 a the tamper condition is evaluated only if this means that the sum of the rms value of currents is not negligible with respect to i max (the threshold corresponds to about 0.4% of i max ). in this case this is true since: i r + i s +i t +i n = 14.4 a > 0,703125 a = i max / 256 the criterion for tamper detection is this can also be expressed as which means the sirms value must not exceed 3.13% of (i r + i s +i t +i n ). in this example: sirms = 0,149967 < 0.45 = (i r + i s +i t +i n ) / 32 then bcs = 0. figure 11. currents of the three phase system in example > + + + = 256 i i i i i i max n t s r x () 8 i i x rms x > () 32 i 4 i 4 i sirms x rms x rms x > = ? ? ? ? ? ? =
STPMC1 theory of operation doc id 15728 rev 6 31/77 example 6: 3-ph system - bcs = 1 let us consider a three-phase, four wires system where: i r = 5 a i s = 5 a i t = 3.2 a i n = 0 a the tamper is evaluated because i r + i s +i t +i n = 13.2 a > 0,703125 a = i max / 256 in this case sirms = 0,449901 a > 0,4125 a = (i r + i s +i t +i n ) / 32 then bcs = 1. example 7: 1-ph system - bcs = 0 let us consider a single phase systems with only s and t wires connected where i s = 5 a i t = 4 a i max = 180 a in this case the criterion for tamper evaluation is verified since: (i s + i t ) = 9 a > 0,703125 a = i max / 256 but bcs = 0 because 7/9 i t = 3.11 a < i s = 5 a < 9/7 i t = 5.14 a and 7/9 i s = 3.88 a < i t = 4 a < 9/7 i s = 6.43 a example 8: 1-ph system - bcs = 1 let us consider the case in which: i s = 5 a i t = 3 a i max = 180 a also in this case the criterion for tamper evaluation is verified: (i s + i t ) = 8 a > 0,703125 a = i max / 256 now bcs = 1 because 7/9 i s = 3.88 a > i t = 3 a 9.10.2 phase sequence is wrong (status bit bsf ) one tamper condition is that phase sequence is not correct. a 3-ph phase status bit bsf checks the sequence of phases, which, in a three phase system is one of the following: r s t s t r t r s in one of the above cases bsf is cleared, otherwise bit bsf is set.
theory of operation STPMC1 32/77 doc id 15728 rev 6 whatever the sys bits setting (indicating phases presence and configuration), bit bsf is always calculated, but it is valid only in cases sys is 0, 1, 2 and 3. in fact in this case all the three phase voltage signals (u r , u s , u t ) are available and can be checked, as shown in 0. in cases sys is 4, 5, 6, 7, only two or one voltage signal are available (u s and/or u t ), so that the sequence cannot be checked. bit bsf is always set in the status byte, but it must be ignored. in standalone application for sys = 0, 1 or 2 (3-phase systems) bit bsf is available as output on sdatd pin. 9.10.3 phase active powers do not have the same sign (status bit bif ) the 3-phase status bit bif is produced from status bit sign of each phase. if bit sign is not equal in all three phases (r, s and t), then bit bif is set. in a standalone application for sys = 0, 1 or 2 (3-phase system) bit bif is available as output on sdatd pin. example 9: status bit bif sign r = 0, sign s = 0, sign t = 0 bif = 0 sign r = 1, sign s = 1, sign t = 1 bif = 0 sign r = 1, sign s = 0, sign t = 0 bif = 1 sign r = 0, sign s = 1, sign t = 0 bif = 1 9.10.4 emi is detected emi tamper detection is enabled by configuring bits enh = 1 and apl [1] = 1 (apl [1] sets standalone application mode). the dah signal is checked to verify that: its dc component does not exceed dc max /16 its rms value does not exceed the maximum value rms max /16 where dc max = rms max = 2 16 with hysteresis. if these condition are not verified the emi tamper is detected. table 16. pin description versus sys configuration (u x and i x represent the voltage and the current signals) sys pin01234567 dar u r u r u r u r ---- das u s u s u s u s u s --- dat u t u t u t u t u t u t u t u t dan i n ------- dar i r i r i r i r ---- das i s i s i s -i s i s i s - dat i t i t i t i t i t i t i t i t
STPMC1 theory of operation doc id 15728 rev 6 33/77 emi tamper condition is not available as internal status signal, but it is available (in or with other tamper conditions) on the sdatd pin of the device. in peripheral application mode it is possible to detect emi tamper comparing the value of the 16-bit dcun and of the 12-bit rmsun to the threshold through a microcontroller. 9.11 energy to frequency conversion (configuration bits: apl , kmot , lvs , fund ) the STPMC1 provides energy to frequency conversion both for calibration and energy readout purposes. the three hard-wired xdsp, implemented as four 2-channel ? signal processors perform all calculations and produce output data and signals. inside them, each three stage decimation filter inputs a filtered ? signal and its integral as parallel bus or stream to the power and rms computer. all three streams of power (active, reactive and active from the fundamental harmonic) are connected to the corresponding integrators. within the integrators, all three powers are accumulated into energies of 20-bit values according to configuration bit abs and the results are converted into pulse train signals, the frequency of which is proportional to the accumulated energies. each of these signals can be brought out to the led pin. due to the innovative and proprietary power calculation algorithm the frequency signal is not affected by any ripple at twice the line frequency. this feature strongly reduces the calibration time of the meter. through calibration the meter is configured to provide a certain number of pulses per kwh (referred to as power meter constant c ) on the led pin. according to the apl , kmot , lvs and fund configuration bits, the frequency of led signal can provide different information, as shown in paragraphs 9.12 and 9.13 . given c , the number of pulses per kwh provided, the relationship between the lsb value of the source energy registers and the number of pulses provided to led pin is indicated in the table below: table 17. energy registers lsb value register sys = 0, 1, 2, 4, 5, 6, 7 sys = 3 3-ph active energy wide band (p) 3-ph reactive energy wide band (q) 3-ph active energy fundamental (f) 3-ph reactive energy fundamental (r) k p 1000 c2 10 ? ----------------- wh [] = k p 1000 c2 10 ? ----------------- wh [] = k q 1000 c2 10 ? ----------------- varh [] = k q 1000 c2 9 ? -------------- - varh [] = k f 1000 c2 10 ? ----------------- wh [] = k f 1000 c2 9 ? -------------- - wh [] = k r 1000 c2 10 ? ----------------- varh [] = k r 1000 c2 9 ? -------------- - varh [] =
theory of operation STPMC1 34/77 doc id 15728 rev 6 example 10: energy registers lsb value for sys = 0, 1, 2, 4, 5, 6, 7 c = 64000 pulses/kwh = 17.7 hz*kw k p = k f = 15.258 *10-6 wh k q = k r = 15.258 *10-6 varh this means that the reading of 0x00001 in the active energy register represents 15.258 wh, while 0xfffff represents 16 wh. example 11: energy registers lsb value for sys = 3 c = 64000 pulses/kwh = 17.7 hz*kw k p = 15.258 *10-6 wh k f = 30.517 *10-6 wh k q = k r = 30.517 *10-6 varh from 3-phase active energy wide band signal the stepper driving signals ma and mb (output from mop and mon pins) are generated. the frequency of these signals can be configured as shown in paragraph 9.13 . 9.12 using STPMC1 in microcontroller based meter - peripheral operating mode (configuration bits: apl , kmot , lvs , fund ) the higher flexibility of the STPMC1 allows its use in microcontroller based energy meters. in this case the STPMC1 must be programmed to work in peripheral mode setting bit apl [1] = 0. all the spi pins (scs, sclncl, sdatd, syn) are used only for communication purposes, allowing the microcontroller to write and read the internal STPMC1 registers. the peripheral mode has two further different configuration modes according to the status of the apl configuration bit, which changes the function of mop, mon and led pins as described below. apl = 0: in the mop pin, the zcr signal is available (see paragraph 9.5 for details on zcr signal); the pin mon provides the watchdog signal. the dog signal generates a 16 ms long positive pulse every 1.6 seconds. generation of these pulses can be suspended if data are read in intervals shorter than 1.6 ms. the dog signal is actually a watchdog reset signal that can be used to control an operation of an on-board microcontroller. it is set to high whenever the v cc voltage is below 2.5 v, but after v cc goes above 2.5 v this signal starts to run. it is expected that an application microcontroller should access the data in the metering device on regular basis, at least 1/s (recommended is 32/s). every latching of results in the metering device requested from the microcontroller also resets the watchdog. if latching requests does not follow each other within 1.6 second, an active high pulse on mon is produced, because device assumes that microcontroller does not operate properly. this signal can be either control the reset pin of the microcontroller or it can be tied to some interrupt pin. the second chance is recommended for a battery backup application which can enter some sleep mode due to power down condition and should not be reset by metering device. the led pin can be configured through lvs , fund and kmot to output different energy signals, as shown in the table below.
STPMC1 theory of operation doc id 15728 rev 6 35/77 apl = 1: mop/mon provides stepper motor driving signals from 3-phase active energy wide band register with frequency cm related to c (number of pulses on led pin, see par. 9.11 ) according to ta b l e 2 0 . led pin provides 3-phase energy pulses according to ta b l e 1 9 with frequency c not related to kmot . 9.13 driving a stepper motor - standalone operating mode (configuration bits: apl , lvs , kmot ) when used in standalone mode (apl [1] = 1), the STPMC1 is able to directly drive a stepper motor. table 18. led pin configuration for apl = 0 lv s (1 bit) fund (1 bit) kmot (2 bits) led energy output phase freq 00 0 active energy wide band p 3-ph c (1) 1r 2s 3t 01 0 active energy fundamental f 3-ph c 1r 2s 3t 10 0 reactive energy wide band q 3-ph c 1r 2s 3t 11 0 reactive energy fundamental r 3-ph c 1r 2s 3t 1. c is the number of pulses per kwh set with calibration. table 19. led pin configuration for apl = 1 lv s (1 bit) fund (1 bit) led energy output phase freq 0 0 active energy wide band p 3-ph c 0 1 active energy fundamental f 1 0 reactive energy wide band q 1 1 reactive energy fundamental r
theory of operation STPMC1 36/77 doc id 15728 rev 6 from signal p (3-ph active energy), stepper motor driving signals ma and mb (see figure 12 ) are generated by means of internal divider, mono-flop and decoder and brought to mop and mon pins. the numbers of pulses per kwh on mop and mon outputs (cm) is related to the number of pulses on led pin (c, see par. 9.11 ) following the table below. the mono-flop limits the length of the pulses according to the lvs bit value. the decoder distributes the pulses to ma and mb alternatively, which means that each of them has only a half of selected frequency. when a no-load condition is detected ( bil =1) mop and mon are held low because integration of power is suspended. the led pin provides 3-phase active energy pulses according to the table below: figure 12. stepper driving signals mon hi hi low low mop mon hi hi low low mop table 20. configuration of mop and mon driving signals with apl = 1, 2, 3 lv s (1 bit) kmot (2 bits) pulses length freq. cm 0 0 31.25 ms c/64 1 c/128 2c/32 3 c/256 1 0 156.25 ms c/640 1 c/1280 2 c/320 3 c/2560
STPMC1 theory of operation doc id 15728 rev 6 37/77 9.14 negative power accumulation (configuration bit abs , status bit sign ) the abs bits govern energy accumulation in case of negative power; they only affect active power p and fundamental active power f. the 3-ph status bit sign depends upon 3-ph cumulative power direction while the phase status bits sign x depends upon phase x power direction. ta b l e 2 2 shows power calculation modes according to abs 9.15 phase delay calculation the STPMC1 allows the calculation of the phase delays between voltages. if the line frequency f line is 50 hz, a 120 phase delay corresponds to 6.7 ms. table 21. led pin configuration for apl = 2, 3 apl (2 bits) kmot (2 bits) led energy output phase freq 2 - active energy wide band p 3-ph c 3 0 active energy wide band p 3-ph c/64 1c/128 2c/32 3c/256 table 22. accumulation mode for negative power abs (2 bits) accumulation mode power calculation 3-ph sign ma - mb 0 3-phase ferraris mode p = p r + p s + p t p < 0 sign = 0 p 0 sign = 1 p < 0 ma and mb low p 0 see figure 12 1 absolute accumulation per phase p = |p r | + |p s | + |p t |p 0 sign = 1 p 0 see figure 12 2 ferraris mode per phase if p x < 0 p x = 0 p = p r + p s + p t p 0 sign = 1 p 0 see figure 12 3 signed accumulation p = p r + p s + p t p < 0 sign = 0 p 0 sign = 1 p < 0 see figure 12 p 0 see figure 12
theory of operation STPMC1 38/77 doc id 15728 rev 6 the acr, acs and act registers (bits [7:0], see paragraph 9.17.7) holds the information needed for this calculation. let us indicate t rs , t st , t tr , the delays between r, s and t phases. it is: equation 1 t rs + t st + t tr = t = 1 / ? concatenating act[7:0], acs[7:0], acr[7:0] bytes, two 12 bits vectors defined as below are obtained: act[7:0], acs[7:0], acr[7:0] = asr[12, 10:0], art[12, 10:0] the delay times are calculated with the following formulas: equation 2 equation 3 from equation 1 , equation 2 and equation 3 it is possible to retrieve phase delays t rs , t st and t tr . figure 13. phase delay t rs t rs t st t st t tr t tr [] () [] mclk 12 asr 11 tr st asr f 8 1 2 0 : 10 asr t t time ? ? ? ? ? ? ? + ? = ? = [] () [] mclk 12 art 11 st rs art f 8 1 2 0 : 10 art t t time ? ? ? ? ? ? ? + ? = ? =
STPMC1 theory of operation doc id 15728 rev 6 39/77 example 12: phase delay calculation f xtal1 = 4 mhz; mdiv = 0; fr1 = 0 f mclk = 8 mhz f line = 50 hz t = 20 ms; acr[7:0] = 0101 1010 acs[7:0] = 0010 0000 act[7:0] = 0000 0101 asr[12] = 0 asr[10:0] = 000 0101 0010 2 = 82 art[12] = 0 art[10:0] = 00001011010 2 = 90 example 13: phase delay calculation f xtal1 = 4 mhz; mdiv = 0; fr1 = 0 f mclk = 8 mhz f line = 50 hz t = 20 ms; acr[7:0] = 1011 0011 acs[7:0] = 0011 1111 act[7:0] = 0000 0101 asr[12] = 0 asr[10:0] = 000 0101 0011 2 = 83 art[12] = 1 art[10:0] = 111 1011 0011 2 = 1971 [] () [] () + = ? ? + = ? ? ? ? ? ? ? ? + ? = ? ? ? ? ? ? ? + ? = 5 , 1 360 ms 20 s 82 s 82 10 8 8 1 2 0 0000101001 mclk 8 1 2 0 : 10 asr time 6 0 11 2 12 asr 11 asr [] () [] () + = ? ? + = ? ? ? ? ? ? ? ? + ? = ? ? ? ? ? ? ? + ? = 6 , 1 360 ms 20 s 90 s 90 10 8 8 1 2 0 0000101101 mclk 8 1 2 0 : 10 art time 6 0 11 2 12 art 11 art [] () [] () + = ? ? + = ? ? ? ? ? ? ? ? + ? = ? ? ? ? ? ? ? + ? = 5 , 1 360 ms 20 s 83 s 83 10 8 8 1 2 1 0000101001 mclk 8 1 2 0 : 10 asr time 6 0 11 2 12 asr 11 asr [] () [] () ? = ? ? ? ? = ? ? ? ? ? ? ? ? + ? = ? ? ? ? ? ? ? + ? = 4 , 1 360 ms 20 s 76 s 76 10 8 8 1 2 1 1111011001 mclk 8 1 2 0 : 10 art time 6 1 11 2 12 art 11 art
theory of operation STPMC1 40/77 doc id 15728 rev 6 9.16 calibration (configuration bits: pm , tcs , cix , cvx , cca , ccb , cpx ) 9.16.1 voltage and current channels calibration the 8-bit calibration values cvx and cix (where x stands for n, r, s or t) are used as static data for the channel ? calibrators, multiplying their streams to the following factor: k x = (4096 - 1024 + 4cxx )/4096 ( 12.5 %) when configuration bit pm is set, a 2-bit cvx or cix is appended to each cvx or cix respectively: k x = (8192 - 1024 + 4cxx + cxx)/8192 ( 6.25 %) cvx bits are part of the cca configuration byte while cix are part of ccb configuration byte. 9.16.2 phase compensation the STPMC1 does not introduce any phase shift between voltage and current channel. however, the voltage and current signals come from transducers, which could have inherent phase errors. for example, a phase error of 0.1 to 0.3 is not uncommon for a current transformer (ct). these phase errors can vary from part to part, and they must be corrected in order to perform accurate power calculations. the errors associated with phase mismatch are particularly noticeable at low power factors. the STPMC1 provides a means of digitally calibrating these small phase errors introducing some delay. the amount of phase compensation can be set per each phase using the 4 bits of the phase calibration configurators (cpr , cps , cpt ). a vector method of phase shift compensation is implemented. the compensating voltage vector, which is produced from a frequency compensated signal of integrated voltage vector multiplied by a given compensation constant per each phase and is almost perpendicular to the input voltage vector, is subtracted from the input voltage vector at the input of the decimation filter. those phase compensators are merged from a common coarse part cpc and from each phase 4-bit phase error compensator cpx : cpc [1] = 0: k phc = - (16 cpc [0] + cpx ) cpc [1] = 1: k phc = (16 - cpx ) when either pm or tcs are set, a 2-bit cpc is appended to cpc to produce the following factor: cpc [1] = 0: k phc = - (32 cpc + 16 cpc [0] + cpx ) cpc [1] = 1: k phc = [64 - (32 cpc + 16 cpc [0] + cpx )] cpc bits are part of the cca configuration byte. the equation for phase compensation in degree is:
STPMC1 theory of operation doc id 15728 rev 6 41/77 equation 4 ? phc is the phase compensation in degree, k phc is the calculated coefficient, f line is the frequency of voltage signal, f phc is the clock for phase compensation. the clock for phase compensation f phc can be derived as reported in ta b l e 2 3 and ta bl e 2 4 table 23. f phc frequency settings mdiv (1 bit) pm (1 bit) hsa (1 bit) f clk x00f xtal1 / 8 x01f xtal1 / 4 01xf xtal1 / 2 11xf xtal1 / 4 table 24. f phc frequency values f xtal1 pm (1 bit) hsa (1 bit) f clk 4.194 mhz 0 0 524 khz 4.195 mhz 614 khz 8.192 mhz 1.024 mhz 9.830 mhz 1.229 mhz 4.194 mhz 1 1.049 mhz 4.195 mhz 1.229 mhz 8.192 mhz 2.048 mhz 9.830 mhz 2.458 mhz 4.194 mhz 1x 2.097 mhz 4.195 mhz 2.458 mhz 8.192 mhz 2.048 mhz 9.830 mhz 2.458 mhz table 25. f phc frequency settings for pm = 1 f xtal1 f phc 4.194 mhz 2.097 mhz 4.915 mhz 2.458 mhz 8.192 mhz 2.048 mhz 9.830 mhz 2.458 mhz phc line phc phc f f 360 k ? = ?
theory of operation STPMC1 42/77 doc id 15728 rev 6 example 14: phase compensation for pm = 0, tcs = 0 phase shift current for - ? phc : cpc [1] = 0 k phc = - (16 cpc [0] + cpx [3:0]) phase shift current for ? phc : cpc [1] = 1 k phc = (16 - cpx [3:0]) table 26. phase compensation for pm = 0, tcs = 0, f line = 50 hz clk hsa f phc phc phc 4.194 mhz 0 524 khz +0.550, -1.064 0.034 4.915 mhz 614 khz +0.469, -0.908 0.029 8.192 mhz 1.024 mhz +0.281, -0.545 0.018 9.830 mhz 1.229 mhz +0.234, -0.454 0.015 4.194 mhz 1 1.049 mhz +0.275, -0.532 0.017 4.915 mhz 1.229 mhz +0.234, -0.454 0.015 8.192 mhz 2.048 mhz +0.141, -0.272 0.009 9.830 mhz 2.458 mhz +0.117, -0.227 0.007 1 2 4 8 16 cpx[0] cpx[1] cpx[2] cpx[3] cpc[0] i u 1 2 4 8 16 cpx[0] cpx[1] cpx[2] cpx[3] i u
STPMC1 theory of operation doc id 15728 rev 6 43/77 example 15: phase compensation for pm = 0, tcs = 1 phase shift current for - ? phc : cpc [1] = 0 k phc = - (32 cpc[1:0] + 16 cpc [0] + cpx [3:0]) phase shift current for ? phc : cpc [1] = 1 k phc = 64 - (32 cpc[0] + 16 cpc [0] + cpx [3:0]) table 27. phase compensation for pm = 0, tcs = 1, f line = 50 hz clk hsa f phc phc phc 4.194 mhz 0 524 khz +2.198, -4.361 0.034 4.915 mhz 614 khz +1.876, -3.721 0.029 8.192 mhz 1.024 mhz +1.125, -2.232 0.018 9.830 mhz 1.229 mhz +0.937, -1.860 0.015 4.194 mhz 1 1.049 mhz +1.098, -2.180 0.017 4.915 mhz 1.229 mhz +0.937, -1.860 0.015 8.192 mhz 2.048 mhz +0.562, -1.116 0.009 9.830 mhz 2.458 mhz +0.469, -0.930 0.007 1 2 4 8 16 cpx[0] cpx[1] cpx[2] cpx[3] cpc[0] i u 32 64 cpc[1] cpc[0] 1 2 4 8 64 cpx[0] cpx[1] cpx[2] cpx[3] i u 16 cpc[0] 32 cpc[0]
theory of operation STPMC1 44/77 doc id 15728 rev 6 example 16: phase compensation for pm = 1 phase shift current for - ? phc : cpc [1] = 0 k phc = - (32 cpc[1:0] + 16 cpc [0] + cpx [3:0]) phase shift current for ? phc : cpc [1] = 1 k phc = 64 - (32 cpc[0] + 16 cpc [0] + cpx [3:0]) 9.16.3 mutual current compensation mutual current compensation is available only when tcs is clear (rogowski coil). when pm is cleared, the cca and ccb configuration bytes can be used for mutual current influence compensation according to sys value. for monophase systems (sys > 3) the correction factors, (alpha) and (beta), are computed as follows: equation 5 equation 6 table 28. phase compensation for pm = 1, f line = 50 hz clk hsa f phc phc phc 4.194 mhz x 2.097 mhz +0.549, -1.090 0.009 4.915 mhz 2.458 mhz +0.469, -0.930 0.007 8.192 mhz 2.048 mhz +0.562, -1.116 0.009 9.830 mhz 2.458 mhz +0.469, -0.930 0.007 1 2 4 8 16 cpx[0] cpx[1] cpx[2] cpx[3] cpc[0] i u 32 64 cpc[1] cpc[0] 1 2 4 8 64 cpx[0] cpx[1] cpx[2] cpx[3] i u 16 cpc[0] 32 cpc[0] ( 3.1 %) () [] [] 8192 0 : 7 cca 1 8 cca ? ? = ( 3.1 %) () [] [] 8192 0 : 7 ccb 1 8 cca ? ? =
STPMC1 theory of operation doc id 15728 rev 6 45/77 an asymmetrical compensation is implemented by multiplying the phase current with and the neutral current with and these values are subtracted from neutral and phase currents respectively, as shown below: i cs = i t i ct = i s for other values of sys , the values of cca and ccb three correction factors, a 7-bit , 6-bit and 4-bit (gamma) are calculated as follows: equation 7 equation 8 equation 9 from these factors a 4 x 4 matrix, shown in ta b l e 3 0 , implements a symmetrical compensation multiplying each phase and neutral current with its row, adding the products together and subtracting them from the currents. i cr = i s + i t + i n i cs = i r + i t + i n table 29. mutual current compensation matrix for single-phase systems (sys > 3) phase s t s- t - ( 0.78 %) () [] [] 8192 0 : 5 cca 1 8 cca ? ? = ( 0.39 %) () [] [] 8192 3 : 7 ccb 1 7 cca ? ? = ( 0.09 %) () [] [] 8192 0 : 2 ccb 1 6 cca ? ? = table 30. mutual current compensation matrix for three-phase systems (sys < 4) phase r s t n r - s - t | - n ?| -
theory of operation STPMC1 46/77 doc id 15728 rev 6 i ct = i n + i s + i r i cn = i t + i s + i r 9.17 data records map there are seven groups of four data records available, each consisting of a parity nibble (see paragraph 9.17.8 ) and 28-bit data field. the data records have fixed position of reading. this means that no addressing of records is necessary. it is up to an application to decide how many records should read out from the device. if an application sends to device a precharge command (see paragraph 9.20 ) before the reading of a group, the internal group pointer is incremented. this way, a faster access to later groups is possible. below are shown all the groups, their position within the sequence of reading, and the name and assembly of data records. 9.17.1 group 0 data records 0.1 dap: 3- phase active energy wide band: 20-bit accumulator of 3-ph active energy wide band (see paragraph 9.11 ) 3-ph lower status: bits [0:7] of 3-phase status (see ta b l e 3 1 ) 0.2 drp: 3- phase reactive energy: 20-bit accumulator of 3-ph reactive energy (see paragraph 9.11 ) 3-ph up status: bits [8:11] of 3-phase status (see ta b l e 3 1 ) tsg bits: 4 tsg mode signal (see paragraph 9.20 ) 0.3 dfp: 3-phase active energy fundamental: 20-bit accumulator of 3-ph active energy from fundamental harmonic (see paragraph 9.11 ) system signals: commands bank-pump-tst0-tst1-tst2-rd-we-precharge (see paragraph 9.20 ) figure 14. group 0 data records parity 3-phase active energy wide band 3-ph lower status dap drp dfp prd parity dc un period parity 3-phase active energy fundamental system signals 12 bit 4 bit 16 bit 4 bit 4 bit 20 bit 8 bit parity tsg bits 3-phase reactive energy 3-ph up status parity 3-phase active energy wide band 3-ph lower status dap drp dfp prd parity dc un period parity 3-phase active energy fundamental system signals 12 bit 4 bit 4 bit 16 bit 4 bit 4 bit 20 bit 8 bit parity tsg bits 3-phase reactive energy 3-ph up status parity 3-phase active energy wide band 3-ph lower status dap drp dfp prd parity dc un period parity 3-phase active energy fundamental system signals 12 bit 4 bit 16 bit 4 bit 4 bit 20 bit 8 bit parity tsg bits 3-phase reactive energy 3-ph up status parity 3-phase active energy wide band 3-ph lower status dap drp dfp prd parity dc un period parity 3-phase active energy fundamental system signals 12 bit 4 bit 4 bit 16 bit 4 bit 4 bit 20 bit 8 bit parity tsg bits 3-phase reactive energy 3-ph up status
STPMC1 theory of operation doc id 15728 rev 6 47/77 0.4 prd: period: 12-bit line period measurement (see paragraph 9.6 ). by default it is calculated from r-phase signal, if it is missing from s-phase then from t-phase. the value of the period can be calculated from the decimal value of period as: equation 10 dc un: 16-bit dc component of voltage channel of ndsp. it may be dan-v or dah according to the value of enh bit. for example it is dc offset in sigma delta un if enh =0, or dc value of magnetic field if enh is set and a magnetic sensor is connected via stpmsx on dah input. 9.17.2 group 1 data records 1.1 dmr: ur mom: 12-bit momentary value of r phase voltage ir mom: 16-bit momentary value of r phase current 1.2 dms: us mom: 12-bit momentary value of s phase voltage is mom: 16-bit momentary value of s phase current 1.3 dmt: ut mom: 12-bit momentary value of t phase voltage it mom: 16-bit momentary value of t phase current 1.4 dmn: si rms: 12-bit rms value of the sum of all the instantaneous currents (i r + i s + i t + i n ) divided by four: mclk 6 f 2 period t ? = figure 15. group 1 data records dmn dmr dms dmt parity ir mom ur mom parity is mom us mom parity it mom ut mom parity in mom si rms 12 bit 4 bit 16 bit dmn dmr dms dmt parity ir mom ur mom parity ir mom ur mom parity is mom us mom parity is mom us mom parity it mom ut mom parity it mom ut mom parity in mom si rms parity in mom si rms 12 bit 12 bit 4 bit 4 bit 4 bit 16 bit 16 bit dmn dmr dms dmt parity ir mom ur mom parity is mom us mom parity it mom ut mom parity in mom si rms 12 bit 4 bit 16 bit dmn dmr dms dmt parity ir mom ur mom parity ir mom ur mom parity is mom us mom parity is mom us mom parity it mom ut mom parity it mom ut mom parity in mom si rms parity in mom si rms 12 bit 12 bit 4 bit 4 bit 4 bit 16 bit 16 bit
theory of operation STPMC1 48/77 doc id 15728 rev 6 equation 11 in mom: 16-bit momentary value of neutral current note: in systems 3-phase, no neutral, u st , u tr , u rs replace u r , u s , u t respectively. 9.17.3 group 2 data records 2.1 der: ur rms: 12-bit rms value of r phase voltage ir rms: 16-bit rms value of r phase current 2.2 des: us rms: 12-bit rms value of s phase voltage is rms: 16-bit rms value of s phase current 2.3 det: ut rms: 12-bit rms value of t phase voltage it rms: 16-bit rms value of t phase current 2.4 den: un rms: 12-bit rms value of voltage channel of ndsp. it may be dan-v or dah according to the value of enh bit. in rms: 16-bit rms value of neutral current note: in systems 3-phase, no neutral, u st , u tr , u rs replace u r , u s , u t respectively. rms x 4 i sirms ? ? ? ? ? ? = figure 16. group 2 data records der parity ir rms ur rms des det den parity is rms us rms parity it rms ut rms parity in rms un rms 12 bit 4 bit 16 bit der parity ir rms ur rms parity ir rms ur rms des det den parity is rms us rms parity is rms us rms parity it rms ut rms parity it rms ut rms parity in rms un rms parity in rms un rms 12 bit 12 bit 4 bit 4 bit 4 bit 16 bit 16 bit der parity ir rms ur rms des det den parity is rms us rms parity it rms ut rms parity in rms un rms 12 bit 4 bit 16 bit der parity ir rms ur rms parity ir rms ur rms des det den parity is rms us rms parity is rms us rms parity it rms ut rms parity it rms ut rms parity in rms un rms parity in rms un rms 12 bit 12 bit 4 bit 4 bit 4 bit 16 bit 16 bit
STPMC1 theory of operation doc id 15728 rev 6 49/77 9.17.4 group 3 data records 3.1 dar: r-phase active energy wide band: 20-bit accumulator of r phase active energy wide band r-phase status: 8-bit r phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase r active energy wide band. 3.2 das: s-phase active energy wide band: 20-bit accumulator of s phase active energy wide band s-phase status: 8-bit s phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase s active energy wide band. 3.3 dat: phase active energy wide band: 20-bit accumulator of t phase active energy wide band t-phase status: 8-bit t phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase t active energy wide band. 3.4 cf0: bits [27..0] of configurators (see ta bl e 3 3 ). figure 17. group 3 data records 4 bit dar das dat cf0 parity r-phase active energy wide band r-phase status parity s-phase status s-phase active energy wide band parity t-phase active energy wide band t-phase status parity bits [27..0] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit dar das dat cf0 parity r-phase active energy wide band r-phase status parity r-phase active energy wide band r-phase status parity s-phase status s-phase active energy wide band parity s-phase status s-phase active energy wide band parity t-phase active energy wide band t-phase status parity t-phase active energy wide band t-phase status parity bits [27..0] of configurators parity bits [27..0] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit 4 bit dar das dat cf0 parity r-phase active energy wide band r-phase status parity s-phase status s-phase active energy wide band parity t-phase active energy wide band t-phase status parity bits [27..0] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit dar das dat cf0 parity r-phase active energy wide band r-phase status parity r-phase active energy wide band r-phase status parity s-phase status s-phase active energy wide band parity s-phase status s-phase active energy wide band parity t-phase active energy wide band t-phase status parity t-phase active energy wide band t-phase status parity bits [27..0] of configurators parity bits [27..0] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit
theory of operation STPMC1 50/77 doc id 15728 rev 6 9.17.5 group 4 data records 4.1 drr: r-phase reactive energy: 20-bit accumulator of r phase reactive energy. r-phase status: 8-bit r phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase r reactive energy. 4.2 drs: s-phase reactive energy wide band: 20-bit accumulator of s phase reactive energy s-phase status: 8-bit s phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase s reactive energy. 4.3 drt: t-phase reactive energy wide band: 20-bit accumulator of t phase reactive energy t-phase status: 8-bit t phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase t reactive energy. 4.4 cf1: bits [55..28] of configurators (see ta b l e 3 3 ) note: when the configuration bit fund is set, fundamental reactive energy replaces full bandwidth reactive energy. figure 18. group 4 data records 4 bit drr drs drt cf1 parity r-phase reactive energy r-phase status parity s-phase status s-phase reactive energy parity t-phase reactive energy t-phase status parity bits [55..28] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit drr drs drt cf1 parity r-phase reactive energy r-phase status parity r-phase reactive energy r-phase status parity s-phase status s-phase reactive energy parity s-phase status s-phase reactive energy parity t-phase reactive energy t-phase status parity t-phase reactive energy t-phase status parity bits [55..28] of configurators parity bits [55..28] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit 4 bit drr drs drt cf1 parity r-phase reactive energy r-phase status parity s-phase status s-phase reactive energy parity t-phase reactive energy t-phase status parity bits [55..28] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit drr drs drt cf1 parity r-phase reactive energy r-phase status parity r-phase reactive energy r-phase status parity s-phase status s-phase reactive energy parity s-phase status s-phase reactive energy parity t-phase reactive energy t-phase status parity t-phase reactive energy t-phase status parity bits [55..28] of configurators parity bits [55..28] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit
STPMC1 theory of operation doc id 15728 rev 6 51/77 9.17.6 group 5 data records 5.1 dfr: r-phase active energy fundamental: 20-bit accumulator of r phase active energy from fundamental harmonic r-phase status: 8-bit r phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase r active energy fundamental. 5.2 dfs: s-phase active energy fundamental: 20-bit accumulator of s phase active energy from fundamental harmonic s-phase status: 8-bit s phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase s active energy fundamental. 5.3 dft: t-phase active energy fundamental: 20-bit accumulator of t phase active energy from fundamental harmonic t-phase status: 8-bit t phase status (see ta b l e 3 2 ). bit [0] ( bil ) represents no-load condition for phase t active energy fundamental. 5.4 cf2: bits [83..56] of configurators (see ta b l e 3 3 ) figure 19. group 5 data records 4 bit dfr dfs dft cf2 parity r-phase active energy fundamental r-phase status parity s-phase status s-phase active energy fundamental parity t-phase active energy fundamental t-phase status parity bits [83..56] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit dfr dfs dft cf2 parity r-phase active energy fundamental r-phase status parity r-phase active energy fundamental r-phase status parity s-phase status s-phase active energy fundamental parity s-phase status s-phase active energy fundamental parity t-phase active energy fundamental t-phase status parity t-phase active energy fundamental t-phase status parity bits [83..56] of configurators parity bits [83..56] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit 4 bit dfr dfs dft cf2 parity r-phase active energy fundamental r-phase status parity s-phase status s-phase active energy fundamental parity t-phase active energy fundamental t-phase status parity bits [83..56] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit dfr dfs dft cf2 parity r-phase active energy fundamental r-phase status parity r-phase active energy fundamental r-phase status parity s-phase status s-phase active energy fundamental parity s-phase status s-phase active energy fundamental parity t-phase active energy fundamental t-phase status parity t-phase active energy fundamental t-phase status parity bits [83..56] of configurators parity bits [83..56] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit
theory of operation STPMC1 52/77 doc id 15728 rev 6 9.17.7 group 6 data records 6.1 acr: ir rms swm accumulator: 20-bit accumulator of r phase current in swm mode (see paragraph 9.7 ) r-phase elapsed: phase delay (see paragraph 9.15 ) 6.2 acs: is rms swm accumulator: 20-bit accumulator of s phase current in swm mode (see paragraph 9.7 ) s-phase elapsed: phase delay (see paragraph 9.15 ) 6.3 act: it rms swm accumulator: 20-bit accumulator of t phase current in swm mode (see paragraph 9.7 ) t-phase elapsed: phase delay (see paragraph 9.15 ) 6.4 cf3: bits [111..84] of configurators (see ta b l e 3 3 ) 9.17.8 parity calculation each bit of parity nibble is defined as odd parity of all seven corresponding bits of data nibbles. in order to check the data record integrity, the application might execute the following c code, given as an example: int badparity (unsigned char *bp) {register unsigned char prty = grp;/* temp register set to group # (0..6)*/ prty ^= *bp; /* xor it with 1st byte of data */ prty ^= *(bp+1); /* xor it with the 2nd byte */ prty ^= *(bp+2); /* and with the 3rd byte */ prty ^= *(bp+3); /* and last, with the 4th byte */ prty ^= prty<<4; /* combine */ prty &= 0xf0; /* remove the lower nibble */ return (prty != 0xf0); /* returns 1, if bad parity */} figure 20. group 6 data records 4 bit acr acs act cf3 parity ir rms ah accumulator if bad ur r-phase elapsed parity s-phase elapsed is rms ah accumulator if bad us parity it rms ah accumulator if bad ut t-phase elapsed parity bits [111..84] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit acr acs act cf3 parity ir rms ah accumulator if bad ur r-phase elapsed parity ir rms ah accumulator if bad ur r-phase elapsed parity s-phase elapsed is rms ah accumulator if bad us parity s-phase elapsed is rms ah accumulator if bad us parity it rms ah accumulator if bad ut t-phase elapsed parity it rms ah accumulator if bad ut t-phase elapsed parity bits [111..84] of configurators parity bits [111..84] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit 4 bit acr acs act cf3 parity ir rms ah accumulator if bad ur r-phase elapsed parity s-phase elapsed is rms ah accumulator if bad us parity it rms ah accumulator if bad ut t-phase elapsed parity bits [111..84] of configurators 8 bit 20 bit 20 bit 4 bit 4 bit 4 bit acr acs act cf3 parity ir rms ah accumulator if bad ur r-phase elapsed parity ir rms ah accumulator if bad ur r-phase elapsed parity s-phase elapsed is rms ah accumulator if bad us parity s-phase elapsed is rms ah accumulator if bad us parity it rms ah accumulator if bad ut t-phase elapsed parity it rms ah accumulator if bad ut t-phase elapsed parity bits [111..84] of configurators parity bits [111..84] of configurators 8 bit 8 bit 20 bit 20 bit 20 bit 20 bit
STPMC1 theory of operation doc id 15728 rev 6 53/77 example 17: parity calculation let us calculate parity of dmr, the first register of second group: dmr: 02 80 00 c8 prty = grp = 1 /* prty set to 1 - group #*/ prty ^= *bp = 3 /* xor it with 1st byte of data 02 */ prty ^= *(bp+1) = 83 /* xor it with the 2nd byte 80 */ prty ^= *(bp+2) = 83 /* and with the 3rd byte 00 */ prty ^= *(bp+3) = 4b /* and last, with the 4th byte c8 */ prty ^= prty<<4 = fb /* and with b0 */ prty &= 0xf0 = f0 /* parity is ok */ 9.18 status bits map the STPMC1 includes 12 status bits for 3-phase cumulative, and 3 8-bit status byte, one per each phase. all of them provide information about the current meter status. table 31. 3-phase status bits description bit name 0 1 0 bil no-load condition not detected in any phase no-load condition detected in all phases 1 bcf ? signals alive in all phases ? signal stuck in at least one phase 2 bff bfr = 0 in all phases bfr = 1 in at least one phase 3 sign three-phase active energy is negative three-phase active energy is positive 4 phr phase 0 u r < phase u r < 2 5 phs phase 0 u s < phase u s < 2 6 pht phase 0 u t < phase u t < 2 7 hlt data records reading is valid data records are not valid. a reset occurred and a restart is in progress. 8 pin the output pins are consistent with the data the output pins are different from the data, this means some output pin is forced to 1 or 0. 9 bcs sum of all phase currents is below threshold sum of all currents above threshold 10 bsf phase sequence is r -> s -> t phase sequence is not r -> s -> t 11 bif phase energies have equal sign phase energies do not have equal sign
theory of operation STPMC1 54/77 doc id 15728 rev 6 u xmax = 2 12 i xmax = 2 16 there is no differences between status register of x phase in dax, drx, dfx, except for first bit of status register [0] bil . this bit indicates no-load condition. in dax status register bit bil is represents nlc for phase x active energy. in drx status register bit bil is represents nlc for phase x reactive energy. in dfx status register bit bil is represents nlc for phase x fundamental energy. in standalone operating mode the 3-ph bil signal is available on sclnlc pin, 3-ph sign in the syn pin and tamper flag (is the or of all tamper conditions - see paragraph 9.10 ) in sdatd pin. all the other signals can be read only through spi interface. when STPMC1 is used in peripheral mode all these signals can be read through the spi interface. see paragraph 9.18 for details on the status bit location in the STPMC1 data records. 9.19 configuration bits map as indicated in the data records map (see paragraph 9.17 ), the STPMC1 has 112 configuration bits (cfg data records). each of them consists of paired elements, one is the latch (the otp shadow), and the other is the otp antifuse element. in this way all the configuration bits that control the operation of the device can be written in a temporary or permanent way. in case of temporary writing the configuration bits values are written in the so-called shadow registers, which are simple latches that hold the configuration data. the shadow registers are cleared whenever a reset condition occurs (both por and remote reset). in case of permanent writing the configuration bits are stored in the otp (one time programmable) cells that keep the information permanently even if the STPMC1 is without supply, but, once written, they cannot be changed anymore. that's why the cfg are used to keep critical informations like configuration and calibration values of device. when the STPMC1 is released all antifuses presents low logic state. table 32. x-phase status bits description bit name 0 1 0 bil no-load condition not detected no-load condition detected 1 bcf ? signals alive one or both ? signal stuck 2 bfr frequency of phase voltage is in range frequency of line voltage is out of range or voltage amplitude is below threshold ( low = 1) 3 sign active energy is negative active energy is positive 4 lin phase 0 u < phase u < 2 5 zrc after zero crossing after max value crossing 6 low u x > u xmax / 16 u x < u xmax / 32 7 nah single wire meter mode i x > i xmax /4096 and bfr ==1 normal operation mode bfr ==0 or i x < i xmax / 8192 and bfr ==1
STPMC1 theory of operation doc id 15728 rev 6 55/77 each configuration bit can be written sending a byte command to STPMC1 through its spi interface. see paragraph 9.21 for details on spi operation. a system signal we (see paragraph 9.20 ) is used in order to do the permanent write of some otp bit. there is also a special high voltage input pad votp, which delivers the power level necessary for permanent write to otp cell. the STPMC1 can work either using the data stored in the otp cells or the data from the shadow latches. this is done through the rd system signal (see paragraph 9.20 ). if rd is set, the cfg bits originates from corresponding otp shadow latches otherwise, if rd is cleared, the cfg bits originates from corresponding otp antifuses. in this way it is possible to test temporary configurators and calibrators before writing permanently on the device, for example during meter production tests. the very first cfg bit, called tstd , disables any further otp writing. after tstd bit has been set, the only commands accepted are the mode signal precharge (see paragraph 9.20 ) and the remote reset request (see paragraph 9.21.1 ), this implies that the test mode is disabled and shadow latches cannot be used as source of configuration data anymore. the following table represents a collection and function of all configuration bits in the device. for multibit configurations the most significant bit address is bold . table 33. configuration bits map address name n. of bits description important: the decimal value indicated in this column represents the value of the configuration bits with msb in bold. 7-bit binary dec 0000000 0 tstd 1 test mode and otp write disable: - tstd =0: enable test modes and system signals, - tstd =1: normal operation and no more writes to otp or test modes 0000001 1 mdiv 1 selection of measurement clock option: - mdiv =0: f mclk = f xtal1 * 2, - mdiv =1: f mclk = f xtal1 0000010 2 hsa 1 high speed analog clock selection: - hsa =0: f clk = f xtal1 /4, - hsa =1: f clk = f xtal1 /2 0000011 0000100 3 4 apl 2 application type selection: - apl =0: peripheral mop, mon= zcr , watchdog, led=pulses (x), - apl =1: peripheral mop, mon=stepper(p), led=pulses (x), - apl =2: standalone mop, mon=stepper(p), led=pulses(p), sclnlc=no-load sdatd=tamper detected, syn=neg act power - apl =3: standalone, mop,mon=stepper(p) led=pulses (p/64) sclnlc=no-load, sdatd=tamper indicator, syn=neg act power 0000101 5 tcs 1 type of current sensor selection: - tcs =0: rogowski coil, - tcs =1: current transformer (ct) 0000110 6 frs 1 nominal base frequency: - frs =0: 50hz - frs =1: 60hz 0000111 7 fund fundamental active and reactive energy: - fund =0: full bandwidth active energy controls the stepper; full bandwidth reactive energy computation. - fund =1: fundamental active energy controls the stepper; fundamental reactive energy computation
theory of operation STPMC1 56/77 doc id 15728 rev 6 address name n. of bits description important: the decimal value indicated in this column represents the value of the configuration bits with msb in bold. 7-bit binary dec 0001000 8 art 1 reactive energy computation algorithm: - art =0: natural computation - art =1: artificial computation ? not allowed if fund =1 0001001 9 msbf 1 bit sequence output during record data reading selection: - msbf =0: msb first - msbf =1: lsb first 0001010 0001011 10 11 abs 2 negative power accumulation type: - abs =0: 3-phase ferraris, - abs =1: absolute accumulation per phase - abs =2: ferraris per phase, - abs =3: signed accumulation 0001100 0001101 12 13 ltc h 2 no-load condition threshold: - lt c h =0: 0,00125 * fs, - lt c h =1: 0,0025 * fs - lt c h =2: 0,005 * fs - ltch =3: 0,010 * fs 0001110 0001111 14 15 kmot 2 if apl =0 output selection for led pin: kmot =0 kmot =1 kmot =2 kmot =3 3-phase r phase s phase t phase if apl = 1, 2, 3 pulsed output divider: if lvs =0, kmot =0 kmot =1 kmot =2 kmot =3 p/64 p/128 p/32 p/256 the constants at lvs =0 is valid also for led when apl =3 if lvs =1, kmot =0 kmot =1 kmot =2 kmot =3 p/640 p/1280 p/320 p/2560 0010000 16 lvs 1 if apl = 0, 1 selection of pulses(x) for led: - lv s =0: active power, - lv s =1: reactive power. if apl = 1, 2, 3 type of stepper selection: - lv s =0: 10 poles, 30ms, 5v stepper, - lv s =1: 2 poles, 150ms, 3v stepper 0010001 0010010 0010011 17 18 19 sys 3 measurement system selection: - sys =0: 3-phase, 4-wire rstn, 4-systxem rstn (tamper) - sys =1: 3-phase, 4-wire rstn, 3-system rst_ - sys =2: 3-phase, 3-wire rst_, 3-system rst_ (tamper) - sys =3: 3-phase, 3-wire rst_, 2-system r_t_ (aron) - sys =4: 2-phase, 3-wire _stn, 2-system _st_ (america) - sys =5: 1-phase, 2-wire __tn, 2-system _st_ (tamper coil:coil) - sys =6: 1-phase, 2-wire __tn, 2-system _st_ (tamper coil:shunt) - sys =7: 1-phase, 2-wire __tn, 1-system __t_ 0010100 20 sclp 1 polarity of sclnlc idle state selection: - sclp =0: idle state sclnlc=1, - sclp =1: idle state sclnlc=0 table 33. configuration bits map (continued)
STPMC1 theory of operation doc id 15728 rev 6 57/77 address name n. of bits description important: the decimal value indicated in this column represents the value of the configuration bits with msb in bold. 7-bit binary dec 0010101 21 pm 1 precision meter: - pm =0: class 1, - pm =1: class 0.1 0010110 22 fr1 1 selection of measurement clock value: - fr1 =0: f mclk =8.192 mhz, - fr1 =1: f mclk =9.8304 mhz 0010111 0011000 0011001 0011010 0011011 0011100 0011101 0011110 0011111 23 24 25 26 27 28 29 30 31 cca 9 - pm =0 , tcs =0: mutual current influence compensation data a sys = 0, 1, 2, 3 sys = 4, 5, 6, 7 cca [8] = sign cca [8] = sign cca [7] = sign cca [7..0] = cca [6] = sign cca [5..0] = - pm =1 : calibration extenders for voltage and phase cca [8..7] = cvt cca [6..5] = cvs cca [4..3] = cvr cca [1..0] = cpc 0100000 0100001 0100010 0100011 0100100 0100101 0100110 0100111 32 33 34 35 36 37 38 39 cin 8 calibration data for current channel of neutral conductor 0101000 0101001 0101010 0101011 0101100 0101101 0101110 0101111 40 41 42 43 44 45 46 47 cir 8 calibration data for current channel of phase r 0110000 0110001 0110010 0110011 0110100 0110101 0110110 0110111 48 49 50 51 52 53 54 55 cis 8 calibration data for current channel of phase s 0111000 0111001 0111010 0111011 0111100 0111101 0111110 0111111 56 57 58 59 60 61 62 63 cit 8 calibration data for current channel of phase t table 33. configuration bits map (continued)
theory of operation STPMC1 58/77 doc id 15728 rev 6 address name n. of bits description important: the decimal value indicated in this column represents the value of the configuration bits with msb in bold. 7-bit binary dec 1000000 1000001 1000010 1000011 1000100 1000101 1000110 1000111 64 65 66 67 68 69 70 71 cvr 8 calibration data for voltage channel of phase r 1001000 1001001 1001010 1001011 1001100 1001101 1001110 1001111 72 73 74 75 76 77 78 79 cvs 8 calibration data for voltage channel of phase s 1010000 1010001 1010010 1010011 1010100 1010101 1010110 1010111 80 81 82 83 84 85 86 87 cvt 8 calibration data for voltage channel of phase t 1011000 1011001 1011010 1011011 88 89 90 91 cpr 4 compensation of phase error of phase r 1011100 1011101 1011110 1011111 92 93 94 95 cps 4 compensation of phase error of phase s 1100000 1100001 1100010 1100011 96 97 98 99 cpt 4 compensation of phase error of phase t 1100100 1100101 1100110 1100111 1101000 1101001 1101010 1101011 100 101 102 103 104 105 106 107 ccb 8 - pm =0 , tcs =0: mutual current influence compensation data b sys = 0, 1, 2, 3 sys = 4, 5, 6, 7 ccb [7..3] = ccb [7..0] = ccb [2..0] = - pm =1 : calibration extenders for current ccb [7..6] = cit ccb [5..4] = cis ccb [3..2] = cir ccb [1..0] = cin 1101100 1101101 108 109 cpc 2 common sign and coarse phase error compensation table 33. configuration bits map (continued)
STPMC1 theory of operation doc id 15728 rev 6 59/77 9.20 mode signals the STPMC1 includes 12 mode signals located in the drp and dfp registers, some are used for internal testing purposes while others are useful to change some of the operation of the STPMC1. the mode signals are not retained when the STPMC1 supply is not available and then they are cleared when a por occurs, while they are not cleared when a remote reset command (rrr) is sent through spi. the mode signal bit can be written using the normal writing procedure of the spi interface (see spi section). in the table below the commands to change mode signals are given. rd mode signal has been already described in paragraph 9.19 but there is another implied function of the signal rd. when it is set, each sense amplifier is disconnected from corresponding antifuse element and this way, its 3 v nmos gate is protected from the high voltage of votp during permanent write operation. this means that as long as the votp voltage reads more than 3 v, the signal rd should be set. pump : when set, the pump mode signal transform the mop and mon pins to act as driving signals to implement a charge-pump dc-dc converter. this feature is useful in order address name n. of bits description important: the decimal value indicated in this column represents the value of the configuration bits with msb in bold. 7-bit binary dec 1101110 110 enh 1 fifth data input enable: - enh =0: voltage#0=dan, - enh =1: voltage#0=dah 1101111 111 chk 1 reserved ? must be always set to 1 table 33. configuration bits map (continued) table 34. mode signals description bit pos. 76543210 register functional description of commands for changing system signals (x, d, a = {0, 1}) d1110000 drp tsg0=d, controls the transmission latches when apl >1 d1110001 drp tsg1=d reserved d1110010 drp tsg2=d reserved d1110011 drp tsg3=d reserved d1111000 dfp bank=d reserved d1111001 dfp pump=d charge pump mode of mop : mon switch on/off signal d1111010 dfp tst0=d reserved d1111011 dfp tst1=d reserved d1111100 dfp tst2=d reserved d1111101 dfp rd=d read disable of otp block, cfg = (rd == 0)? otp: shadow d1111110 dfp we=d write enable, we = 1 execute permanent write to otp cell x1111111 dfp precharge increments group data record pointer
theory of operation STPMC1 60/77 doc id 15728 rev 6 to boost the v cc supply voltage of the STPMC1 to generate the votp voltage (14 v to 20 v) needed to program the otp antifuse elements. we (write enable): this mode signal is used to permanently write to the otp antifuse element. when this bit is not set, any write to the configuration bit is recorded in the shadow latches. when this bit is set the writing is recorded both in the shadow latch and in the otp antifuse element. precharge : this command increments the index register while reading. after reading a 32- bit data record it is possible to access next group data records by sending this command. this way, a faster access to later groups is possible. tsg0 : in standalone mode it is possible to produce a data latching request by a pulse on test signal tsg0. in fact in such configuration is not possible to latch internal data into transmission latches because the syn is an output pin as long as scs is in idle state and it is under control of an indicator signal of negative power. after tstd configuration bit is set, only the precharge and tsgx commands can be executed. 9.21 spi interface (configuration bit sclp ) the spi interface supports a simple serial protocol, which is implemented in order to enable a communication between some master system (microcontroller or pc) and the device. three tasks can be performed with this interface: remotely resetting the device, reading data records, writing the mode bits and the configuration bits (temporarily or permanently); four pins of the device are dedicated to this purpose: scs, syn, sclncn, sdatd. scs, syn and sclnlc are all input pins while sdatd can be input or output according if the spi is in write or read mode. a high level signal for these pins means a voltage level higher than 0.75 x v cc , while a low level signal means a voltage value lower than 0.25 x v cc . the STPMC1 internal registers are not directly accessible, rather a 32-bit of transmission latches are used to pre-load the data before being read or written to the internal registers. the condition in which scs, syn and sclnlc inputs are set to high level determines the idle state of the spi interface and no data transfer occurs. as previously described in the document, when the STPMC1 is in standalone mode, syn, sclnlc and sdatd can provide information on the meter status (see programmable pin functions) and are not used for spi communication. in this section, the syn, sclnlc and sdatd operation as part of the spi interface is described. scs : when low, scs pin enables spi communication, both in standalone and in peripheral operating mode. this means that the master can abort any task in any phase by deactivation of scs. in standalone mode scs high enables syn, sclnlc and sdatd to output meter status. syn : this pin operates different functions according to the status of scs pin. when scs is low the syn pin status select if the spi is in read (syn = 1) or write mode (syn = 0). when scs is high and syn is also high the results of the input or output data are transferred to the transmission latches. sclnlc : it is basically the clock pin of the spi interface. configuration bit sclp controls the polarity of the clock (see configuration bits map). this pin function is also controlled by
STPMC1 theory of operation doc id 15728 rev 6 61/77 the scs status. if scs is low, sclncl is the input of serial bit synchronization clock signal. when scs is high, sclnlc determines idle state of the spi. sdatd : is the data pin. if scs is low, the operation of sdatd is dependent on the status of syn pin. if syn is high sdatd is the output of serial bit data (read mode) if syn is low sdatd is the input of serial bit data signal (write mode). if scs is high sdatd is input of idle signal. any of the pins above has an internal weak pull-up device of a nominal 15 a. this means that when a pin is not forced by external signals, the state of the pin is logic high. a high state of any of the input pins above is considered in an idle (not active) state. for the spi to operate correctly the STPMC1 must be correctly supplied as described in the power supply section. idle state of spi module is recognized when the signals of pins syn, scs, sclnlc and sdatd are in a logic high state. any spi operations should start from such an idle state. the exception to this rule is when the STPMC1 has been put into standalone application mode. in this mode it is possible that the states of the pins sclnlc, sdatd and syn are not high due to the states of the corresponding internal status bits. when scs is active (low), signal sdatd should change its state at the trailing edge of the signal sclnlc and signal sdatd should be stable at the next leading edge of signal sclnlc. the first valid bit of sdatd is always started with activation of signal sclnlc. 9.21.1 remote reset the timing diagram of the operation is shown in remote reset request timing. the time step can be as short as 30 ns. the internal reset signal is called rrr. unlike the por, the rrr signal does not cause the 125 ms delayed restart of the digital module. this signal does not clear the mode signals. note: all the time intervals must be longer than 30 ns. t 7 -> t 8 is the reset time, this interval must be longer than 30 ns as well. figure 21. timing for providing remote reset request scs syn sclnlc sdatd t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t 10 scs syn sclnlc sdatd t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t 10
theory of operation STPMC1 62/77 doc id 15728 rev 6 9.21.2 reading data records data record reading takes place most often when there is an on-board microcontroller in an application. this microcontroller is capable of reading all measurement results and all system signals (configuration, calibration, status, mode). again, the time step can be as short as 30 ns. there are two phases of reading, called latching and shifting . latching is used to sample results into transmission latches. the transmission latches are the flip-flops that hold the data in the spi interface. this is done with the active pulse on syn when scs is idle. the length of pulse on syn must be longer than 2 periods of measurement clock, i.e. more than 500 ns at 4 mhz. the shifting starts when scs become active. in the beginning of this phase another, but much shorter, pulse (30 ns) on syn should be applied in order to ensure that an internal transmission serial clock counter is reset to zero. an alternative way is to extend the pulse on syn into the second phase of reading. after that reset is done, a 32 serial clocks per data record should be applied. up to 8 data records can be read this way. this procedure can be aborted at any time by deactivation of scs . the timing diagram of the reading operation is shown in timing for data records reading. one can see the latching and beginning of shifting phase of the first byte of the first data record and end of reading. t 1 ?> t 2 : latching phase. interval value > 2/f clk t 2 ?> t 3 : data latched, spi idle. interval value > 30 ns. t 3 ?> t 4 : enable spi for read operation. interval value > 30 ns. t 4 ?> t 5 : serial clock counter is reset. interval value > 30 ns. t 5 ?> t 6 : spi reset and enabled for read operation. interval value > 30 ns t 7 : internal data transferred to sdatd t 8 : sdatd data is stable and can be read figure 22. timing for data records reading sclnlc sdatd syn scs 1st byte last bit of 32nd byte f(read) t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 sclnlc sdatd syn scs 1st byte last bit of 32nd byte f(read) t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8
STPMC1 theory of operation doc id 15728 rev 6 63/77 the first read out byte of the data record is the least significant byte (lsb) of the data value and of course, the fourth byte is the most significant byte (msb) of the data value. each byte can be further divided into a pair of 4-bit nibbles, most and least significant nibble (msn, lsn). this division makes sense with the msb of the data value because the msn holds the parity code. the sequence of the data record during the reading operation is fixed. however, an application may apply a precharge command (see mode signal description) prior to the reading phase. this command increases the group pointer forcing the device to respond with the next group data records sequence. the system that reads the data record from the STPMC1 should check the integrity of each data record, as indicated in paragraph 9.17.8 . if the check fails, the reading should be repeated, but this time only the shifting should be applied; otherwise new data would be latched into transmission latches, thus losing the previous reading. normally, each byte is read out as the most significant bit (msb) first. but this can be changed by setting the msbf configuration bit in the STPMC1 cfl data record. if this is done, each byte is read out as the least significant bit (lsb) first. 9.21.3 writing procedure each writable bit (configuration and mode bits) has its own 7-bit absolute address. for the configuration bits, the 7-bit address value corresponds to its decimal value, while for the mode bits the addresses are those indicated in the mode signal paragraph. in order to change the state of a latch one must send to the STPMC1 a byte of data which is the normal way to send data via spi. this byte consists of 1-bit data to be latched (msb), followed by 7-bit address of destination latch, which makes total 8 bits of command byte, as summarized in the table below. figure 23. data records reconstruction
theory of operation STPMC1 64/77 doc id 15728 rev 6 example 18: setting a configuration bit to set the configuration bit 47 (part of the r-phase current channel calibrator) to 0, we must convert the decimal 47 to its 7-bit binary value: 0101111. the byte command is then composed like this: 1 bit data value+7-bits address = 10101111 (0xaf) the same procedure should be applied for the mode signals, but in this case the 7-bits address must be taken from the relative ta b l e 3 4 . the lsb of command is also called exe bit because instead of a data bit value, the corresponding serial clock pulse is used to generate the necessary latching signal. this way the writing mechanism does not need the measurement clock in order to operate, which makes the operation of spi module of STPMC1 completely independent from the rest of device logic except from the signal por. commands for changing system signals should be sent during active signals scs and syn as it is shown in figure 24 . the syn must be put low in order to disable sdatd output driver of STPMC1 and make the sdatd as an input pin. a string of commands can be send within one period of active signals scs and syn or command can be followed by reading the data record but, in this case, the syn should be deactivated in order to enable sdatd output driver and a syn pulse should be applied before activation of scs in order to latch the data. t 1 ?> t 2 (> 30 ns): spi out of idle state t 2 ?> t 3 (> 30 ns): spi enabled for write operation table 35. functional description of commands bit pos. 76543210 command (x, d, a = {0, 1}) d0000000 cfg000=d, (shadow of first configurator, tstd) daaaaaaa cfga=d, (shadow of any configurator, a = aaaaaa 2 < 1110000 2 ) d1101111 cfg111=d, (shadow of last configurator, chk) figure 24. timing for writing configuration and mode bits t 1 t 2 t 3 t 4 t 5 t 6 t 8 t 9 t 7 sclnlc syn scs sdatd t 1 t 2 t 3 t 4 t 5 t 6 t 8 t 9 t 7 sclnlc syn scs sdatd
STPMC1 theory of operation doc id 15728 rev 6 65/77 t 3 : data value is placed in sda t 4 : sda value is stable and shifted into the device t 3 ?> t 5 (> 10 s): writing clock period t 3 ?> t 5 : 1 bit data value t 5 ?> t 6 : 6 bits address of the destination latch t 6 ?> t 7 : 1 bit exe command t 8 : end of spi writing t 9 : spi enters idle state 9.21.4 interfacing the standard 3-wire spi with STPMC1 spi due to the fact that a 2-wire spi is implemented in the STPMC1, it is clear that sending any command from a standard 3-wire spi would require 3-wire to 2-wire interface, which should produce a proper signal on sdatd from host signals sdi, sdo and syn. a single gate 3- state buffer could be omitted by an emulation of spi just to send some command. on a microcontroller this would be done by the following steps: 1. disable the spi module 2. set sdi pin which is connected to sdatd to be output 3. activate syn first and then scs 4. apply new bit value to sdi and activate scl 5. deactivate scl 6. repeat the last two steps seven times to complete one byte transfer 7. repeat the last three steps for any remaining byte transfer 8. set sdi pin to be input 9. deactivate scs and the syn 10. enable the spi module in case of precharge command (0xff), emulation above is not necessary. due to the pull up device on the sdatd pin of the STPMC1 the processor needs to perform the following steps: 1. activate syn first in order to latch the result; 2. after at least 1 s activate scs 3. write one byte to the transmitter of spi (this produces 8 pulses on scl with sdi = 1) 4. deactivate syn 5. optionally read the data records (the sequence of reading is altered 6. deactivate scs 9.21.5 permanent writing of the cfg bits in order to make a permanent set of some cfg bits, the following procedure should be conducted:
theory of operation STPMC1 66/77 doc id 15728 rev 6 1. collect all addresses of cfg bits to be permanently set into some list 2. clear all otp shadow latches 3. set the system signal rd 4. connect a current source of at least +14 v, 1 ma to 3 ma to votp 5. wait for votp voltage is stable 6. set one otp shadow latch from the list 7. set the system signal we 8. wait for 300 s 9. clear the system signal we 10. clear the otp shadow latch which was set in step 6 11. until all wanted cfg bits are permanently set, repeat steps 5 to 11 12. disconnect the current source 13. wait for votp voltage is less than 3v 14. clear the system signal rd 15. read all data records, in the last two of them there is read back of cfg bits 16. if verification of cfg bits fails and there is still chance to pass, repeat steps 1 to 16 for set or clear steps, apply the timing shown in timing for data records reading with proper signal on the sdatd. for step 15, apply the timing shown in timing for writing configuration and mode bits. for permanent set of the tstd bit, which causes no more writing to the configuration bits, the procedure above must be conducted in such way that steps 6 to 13 are performed in series during single period of active scs because the idle state of scs would make the signal tstd immediately effective which in turn, would abort the procedure and possibly destroy the device due to clearing of system signal rd and so, connecting all gates of 3 v nmos sense amplifiers of already permanently set cfg bits to the votp source.
STPMC1 energy calculation algorithm doc id 15728 rev 6 67/77 10 energy calculation algorithm for the purpose of simplicity the energy computation shown below is relative to only one phase. given line voltage and current as: equation 12 u = u sin ( t) i = i sin( t + ? ) the voltage divider, ad converter and calibrator produce the value: equation 13 v u = u (r 2 /(r 1 +r 2 ) (a u /v ref ) k u = u k d = a sin ( t) the rogowski coil preamplifier, ad converter and calibrator produce the value: equation 14 v i = - l (di/dt) (a i /v ref ) k i = - i k l cos ( t + ? ) = - b cos ( t + ? ) the 2 nd stage internal integrations produce the values: equation 15 v ui = v u dt = - (a / ) cos ( t) k int equation 16 vii = v i dt = - b sin ( t + ? ) k int from signs of v u and v ui the base frequency of line can be produced: equation 17 / k int = k / t this result is used to compensate eq. 41, eq. 44, eq. 45 and eq. 54. the frequency compensated values are: equation 18 v uic = / k int v ui = - a cos ( t) equation 19 v iic = / k int v ii = - b sin ( t + ? ) the 3 rd stage internal integrations and dc cancellations produce the values: equation 20 v uiic = v uic dt = - (a / ) sin ( t) k int equation 21 v iiic = v iic dt = b cos ( t + ? ) k int
energy calculation algorithm STPMC1 68/77 doc id 15728 rev 6 in case of shunt sensor (tcs = 1), an additional stage of internal digital differentiated produces the value: equation 22 v d = dv u /dt = a cos ( t) k dif the shunt preamplifier, ad converter and calibrator produce the value: equation 23 vs = i r s (a i /v ref ) k i = i k s = c sin ( t + ? ) the 2 nd stage internal integrations produce the values: equation 24 v di = v d dt = a sin ( t) k dif k int = a sin ( t) equation 25 v si = v s dt = - (c / ) cos ( t + ? ) k int the frequency compensated values are: equation 26 v dic = / k int v di = a sin ( t) / k int equation 27 v sic = / k int v si = - c cos ( t + ? ) the 3 rd stage internal integrations and dc cancellations produce the values: equation 28 v diic = v dic dt = a cos ( t) k dif k int = a cos ( t) equation 29 v siic = v sic dt = - (c / ) sin ( t + ? ) k int 10.1 active energy calculation the active power is computed as follows. first, the voltage stream from the 1 st stage ( equation 13 or equation 22 ) is multiplied to the 16-bit current from the 2 nd stage ( equation 16 or equation 25 ) and current stream from the 1 st stage ( equation 14 or equation 23 ) is multiplied to 16-bit voltage from the 2 nd stage of filter ( equation 15 or equation 24 ), yielding: equation 30 p 1 = v u v ii = - abk int sin ( t) sin ( t + ? ) = - abk int [cos ? - cos (2 t + ? )] / 2 equation 31 p 2 = v ui v i = abk int cos ( t) cos ( t + ? ) = abk int [cos ? + cos (2 t + ? )] / 2
STPMC1 energy calculation algorithm doc id 15728 rev 6 69/77 in case of a non rogowski sensor, the corresponding products are: equation 32 p 1 = v d v si = - ac k dif k int cos ( t) cos ( t + ? ) = - ac [cos ? + cos (2 t + ? )] / 2 equation 33 p 2 = v di v s = ac k dif k int sin ( t) sin ( t + ? ) = ac [cos ? - cos (2 t + ? )] / 2 then a subtraction of p 1 from p 2 is performed: equation 34 p = (p 2 - p 1 ) / 2 = (ab cos ? ) k int / 2 = (uk d ik l cos ? ) k int / 2 = u rms i rms cos ? k p where: equation 35 k p = k d k l k int this gives the same result for p in case of non rogowski sensor, substituting b and k l k int with c and k s : equation 36 p = (p 2 - p 1 ) / 2 = (ac cos ? ) / 2 = (uk d ik s cos ? ) / 2 = u rms i rms cos ? k p where: equation 37 k p = k d k s the result in equation 35 and equation 36 is proportional to the dc part of active power of line. the division by 2 is a feature of ? subtractor. the absence of harmonic components eliminates the spread of results due to asynchronism with the line. this fact enables fast a calibration procedure which is used to set the target constant of meter k p . a sensitivity analysis of k p yields: equation 38 k p /k p = l/l + r 1 / (r 1 +r 2 )( r 2 /r 2 - r 1 /r 1 ) + a u /a u + a i /a i - 2 v ref /v ref equation 39 k p /k p = r s / r s + r 1 / (r 1 +r 2 )( r 2 /r 2 - r 1 /r 1 ) + a u /a u + a i /a i - 2 v ref /v ref it is clear that the device is responsible for a u , a i and v ref parts. the parts k u , k i and k int are omitted, because they are not subject to aging or temperature variations due to digital implementation. 10.2 reactive energy calculation the natural reactive power (art = 0) of the line is computed as follows. first, 16-bit voltage from the 3 rd stage ( equation 20 or equation 28 ) is multiplied by the current stream from the 1 st stage ( equation 14 or equation 23 ) and the frequency
energy calculation algorithm STPMC1 70/77 doc id 15728 rev 6 compensated stream of 16-bit voltage from the 2 nd stage of filter ( equation 18 or equation 26 ) is multiplied by the 16-bit current stream from the 2 nd stage ( equation 16 or equation 25 ) yielding: equation 40 q 1 = v uiic v i = abk int sin ( t) cos ( t + ? ) = - abk int [sin ? - sin (2 t + ? )] / 2 equation 41 q 2 = / k int v ui v ii = abk int cos ( t) sin ( t + ? ) = abk int [sin ? + sin (2 t + ? )] / 2 in case of non rogowski sensor, the corresponding products are: equation 42 q 1 = v diic v s = ack dif k int cos ( t) sin ( t + ? ) = ac [sin ? + sin (2 t + ? )] / 2 equation 43 q 2 = / k int v di v si = - ack dif k int sin ( t) cos ( t + ? ) = - ac [sin ? - sin (2 t + ? )] / 2 then a subtraction of q 1 from q 2 is performed: equation 44 q = (q 2 - q 1 ) / 2 = (ab sin ? ) k int / 2 = (uk d ik l sin ? ) k int / 2 = u rms i rms sin ? k p this gives the same result for q in case of non rogowski sensor, substituting b and k l k int with c and k s : equation 45 q = (q 2 - q 1 ) / 2 = (ac sin ? ) = (uk d ik s sin ? ) / 2 = u rms i rms sin ? k p the artificial reactive power (art = 1) of line is computed as follows. the inter-phase voltage sigma-delta stream is computed from voltage stream from the 1 st stage as follows: equation 46 v ur = (v us - v ut ) / 2 v us = (v ut - v ur ) / 2 v ut = (v ur - v us ) / 2 the inter-phase voltage sigma-delta stream ( equation 46 ), the 16-bit current from the 2 nd stage ( equation 16 or equation 25 ) and the value of 1 / 3 are multiplied yielding: equation 47 q = v u v ii 1 / 3 = ab k int [sin ? + sin (2 t + ? )] / 2 or in case of non rogowski sensor, the corresponding products are: equation 48 q = v d v si 1 / 30 = ac [sin ? + sin (2 t + ? )] / 2
STPMC1 energy calculation algorithm doc id 15728 rev 6 71/77 10.3 voltage and current rms values calculation the i rms value is produced from 16-bit value of equation 16 : equation 49 the ui rms is produced from stream and 16-bit value of equation 15 : equation 50 in case of non rogowski sensor, the same dedicated rms blocks produce some other values, because input values for the blocks are changed. therefore, another rms value, named ii rms is produced from 16-bit value of equation 25 : equation 51 the u rms is produced from stream and 16-bit value of equation 24 : equation 52 10.4 energy integration the internal hard-wired dsp unit performs all the computations above in real time for a power line in parallel by means of arithmetic blocks. due to implementation of an integrator, up/down counter or deviator, part of which is also an integrator in a feedback, additional factors are introduced into computations. if we declare f mclk as the measurement clock frequency and m as number of possible values of some integrator, the following constant factors can be defined: equation 53 k int = 2 f mclk / m int = 2 8 k ud = 2 f mclk / m ud = 2 11 k dif = m dif / 2 f mclk = 2 -8 i rms k l k int = t 0 2 ii dt t 1 v = b 2 1 ui rms k d = t 0 2 ui dt t 1 v = ak int / 2 1 ii rms k s k int = t 0 2 si dt t 1 v = c/ 2 1 u rms k d = t 0 2 di dt t 1 v = a 2 1
energy calculation algorithm STPMC1 72/77 doc id 15728 rev 6 the dsp performs also an integration of powers (p, q) into energies: equation 54 aw = u rms i rms cos ? k p k ud equation 55 aw = u rms i rms sin ? k p k ud these integrators are implemented as up/down counters and they can roll over. 20-bit output buses of the counters are assigned as the most significant part of the energy data records. it is a responsibility of the application to read the counters at least every second so as not to miss any rollover. the integration of power can be suspended due to detected error on the source signals or due to no load condition. from aw, stepper output signals are generated. 10.5 fundamental power calculation the fact that integration suppresses all but fundamental components of signals is used to compute the fundamental active power, which is in case of rogowski coil: equation 56 f 1 = v uic v iiic = - abk int cos ( t) cos ( t + ? ) = - abk int [cos ? + cos (2 t + ? )] / 2 equation 57 f 2 = v iic v uiic = - abk int sin ( t) sin ( t + ? ) = abk int [cos ? - cos (2 t + ? )] / 2 equation 58 f = (f 2 - f 1 ) / 2 = (ab cos ? ) k int / 2 = (uk d ik l cos ? ) k int / 2 = u rms i rms cos ? k p similar result are found in case of non rogowski sensor: equation 59 f 1 = v dic v siic = - ac sin ( t) sin ( t + ? ) = - ac [cos ? - cos (2 t + ? )] / 2 equation 60 f 2 = v sic v diic = - ack dif k int cos ( t) cos ( t + ? ) = - ac [cos ? + cos (2 t + ? )] / 2 equation 61 f = (f 2 - f 1 ) / 2 = - ac cos (2 t + ? ) = uk d ik s cos (2 t + ? ) / 2 = u rms i rms cos (2 t + ? ) k p the fundamental reactive power in case of a rogowski coil is: equation 62 q = v uiic v iiic / k int = - abk int cos ( t) sin ( t + ? ) = abk int [sin ? - sin (2 t + ? )] / 2 similar results are found in cases of non rogowski sensors: equation 63 q = v diic v siic / k int = - ac cos ( t) sin ( t + ? ) = ac [sin ? - sin (2 t + ? )] / 2.
STPMC1 package mechanical data doc id 15728 rev 6 73/77 11 package mechanical data in order to meet environmental requirements, st offers these devices in different grades of ecopack ? packages, depending on their level of environmental compliance. ecopack ? specifications, grade definitions and product status are available at: www.st.com . ecopack ? is an st trademark.
package mechanical data STPMC1 74/77 doc id 15728 rev 6 dim. mm. inch. min. typ. max. min. typ. max. a 1.2 0.047 a1 0.05 0.15 0.002 0.004 0.006 a2 0. 8 1 1.05 0.0 3 1 0.0 39 0.041 b 0.1 9 0. 3 0 0.007 0.012 c0.0 9 0.20 0.004 0.007 9 d 6.4 6.5 6.6 0.252 0.256 0.260 e 6.2 6.4 6.6 0.244 0.252 0.260 e1 4. 3 4.4 4.4 8 0.16 9 0.17 3 0.176 e 0.65 b s c 0.0256 b s c k0 8 0 8 l 0.45 0.60 0.75 0.01 8 0.024 0.0 3 0 t ss op20 mechanical data c e b a2 a e1 d 1 pin 1 identification a1 l k e 00 8 7225c
STPMC1 package mechanical data doc id 15728 rev 6 75/77 dim. mm. inch. min. typ. max. min. typ. max. a 33 0 12. 99 2 c 12. 8 1 3 .2 0.504 0.51 9 d 20.2 0.7 9 5 n60 2. 3 62 t 22.4 0. 88 2 ao 6. 8 7 0.26 8 0.276 bo 6. 9 7.1 0.272 0.2 8 0 ko 1.7 1. 9 0.067 0.075 po 3 . 9 4.1 0.15 3 0.161 p 11. 9 12.1 0.46 8 0.476 tape & reel t ss op20 mechanical data
revision history STPMC1 76/77 doc id 15728 rev 6 12 revision history table 36. document revision history date revision changes 22-may-2009 1 initial release. 03-jul-2009 2 updated: paragraphs 9.4 , 9.16 and 9.17.8 . 28-jul-2009 3 updated: paragraph 9.16.2 . 19-may-2010 4 added: example 5: 3-ph system - bcs = 0 on page 29 , example 6: 3-ph system - bcs = 1 on page 31 , example 7: 1-ph system - bcs = 0 on page 31 , example 8: 1-ph system - bcs = 1 on page 31 and equation 11: on page 48 . modified: paragraph 9.17.2 on page 47 . 11-oct-2011 5 updated: v ih and v il values table 7 on page 13 . 24-apr-2012 6 modified: supports iec 62052-11 / 62053-21 / 62053-23 standards features on page 1 , table 11 on page 23 and table 23 on page 41 . added: table 12 on page 23 .
STPMC1 doc id 15728 rev 6 77/77 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a particular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by two authorized st representatives, st products are not recommended, authorized or warranted for use in military, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or register ed trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2012 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of STPMC1

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X